Constructor
new DefCoordSystem(paramsopt)
Default values
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
<optional> |
Properties
|
- Source:
Methods
compute(info) → {Object}
Computes the coordinate system
Parameters:
Name | Type | Description |
---|---|---|
info |
CreateInfo | The creation info |
- Source:
Returns:
An object of type TYPE_COORD_SYSTEM
- Type
- Object
(static) computeContravariantBasis(u, v) → {Object}
Computes the contravariant basis for a given basis
As the basis vectors are not required to be normalized or orthogonal, the contravariant basis can be used to determine the coordinates of a vector in the given basis
Parameters:
Name | Type | Description |
---|---|---|
u |
Object | The first axis |
v |
Object | The second axis |
- Source:
Returns:
The contravariant basis vectors
- Type
- Object
(static) createSystem(paramsopt) → {Object}
Creates a coordinate system structure for the given parameters
If origin is not given, it defaults to the usual (0,0)
If u is not given, it defaults to the usual x-axis (1,0)
If v is not given, it defaults to the normal vector to u.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
<optional> |
Properties
|
- Source:
Returns:
- Type
- Object
(static) fromContravariant(system, parentopt) → {CreateInfo}
Creates a coordinate system that consist of the same origin but the contravarint base vectors as the given system
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
system |
Number | Object | Either the index or value of a TYPE_COORD_SYSTEM. The system which this one is based on | |
parent |
Number | Object |
<optional> |
Either the index or value of a TYPE_COORD_SYSTEM. The parent coordinate system |
- Source:
Returns:
The creation info
- Type
- CreateInfo
(static) fromTransform(paramsopt, defaultValuesopt) → {CreateInfo}
Creates a coordinate system by specifying a transformation of the local axes
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
<optional> |
Properties
|
||||||||||||||||||||
defaultValues |
Object |
<optional> |
Properties
|
- Source:
Returns:
The creation info
- Type
- CreateInfo
(static) fromValues(paramsopt) → {CreateInfo}
Creates a coordinate system by specifying local origin and axes
If the first axis (u) is given, the second default value will be overriden by the given second axis (v) as well, even if that is empty.
That means, if u is not given, v will also be set to empty and used the default values, if they are set.
If v is empty, it will be computed as the normal to u.
When not given any values, the defaults are the usual coordinate axies with origin (0,0) and u = (1,0), v = (0,1)
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
<optional> |
Properties
|
- Source:
Returns:
The creation info
- Type
- CreateInfo
(static) isRightHanded(u, v)
Computes, whether a coordinate system is right-handed
Parameters:
Name | Type | Description |
---|---|---|
u |
Object | The first axis |
v |
Object | The second axis |
- Source:
Returns:
True, if the coordinate system is right-handed, otherwise false
(static) pointFromCoordSystem(coords, coordSystem) → {Object}
Computes the world coordinates of a point specified in the local coordinates
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
coords |
Object | The local coordintaes | ||||||||||||
coordSystem |
Object |
Properties
|
- Source:
Returns:
The world point
- Type
- Object
(static) vectorFromCoordSystem(coords, coordSystem) → {Object}
Computes the world coordinates of a vector specified in the local coordinates
As a vector has no position, this just depends on the axes
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
coords |
Object | The local coordintaes | |||||||||
coordSystem |
Object |
Properties
|
- Source:
Returns:
The world vector
- Type
- Object