API Documentation
Loading...
Searching...
No Matches
Constraint.h
Go to the documentation of this file.
1/**--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: NDEVR
28File: NDEVRPCH
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "Particle.h"
34namespace NDEVR
35{
36
37 const fltp04 singleMove[14] = { 0.4f, 0.64f, 0.784f, 0.8704f, 0.92224f, 0.95334f, 0.97201f, 0.9832f, 0.98992f, 0.99395f, 0.99637f, 0.99782f, 0.99869f, 0.99922f };
38
39 const fltp04 doubleMove[14] = { 0.4f, 0.48f, 0.496f, 0.4992f, 0.49984f, 0.49997f, 0.49999f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f };
40
41 class Constraint {
42 private:
43
44 //double rest_distance; // the length between particle p1 and p2 in rest configuration
45
46 public:
47
49 Particle& p2; // the two particles that are connected through this constraint
50
52 : p1(p1)
53 , p2(p2)
54 {}
55
56 /* This is one of the important methods, where a single constraint
57 * between two particles p1 and p2 is solved the method is called
58 * by Cloth.time_step() many times per frame*/
59 void satisfyConstraint(uint04 constraintTimes);
60 };
61}
Definition Constraint.h:41
Particle & p1
Definition Constraint.h:48
Constraint(Particle &p1, Particle &p2)
Definition Constraint.h:51
void satisfyConstraint(uint04 constraintTimes)
Definition Constraint.cpp:21
Particle & p2
Definition Constraint.h:49
Definition Particle.h:68
Definition ACIColor.h:37
const fltp04 doubleMove[14]
Definition Constraint.h:39
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:157
const fltp04 singleMove[14]
Definition Constraint.h:37
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120