Vector3D Struct Reference
#include <Vector3D.h>
![](../class_vector3_d.png)
# Public Attributes | |
int16 | x |
int16 | y |
int16 | z |
# Additional Inherited Members | |
![]() | |
void | constructor () |
Class' constructor. | |
const void * | getVTable () |
bool | mutateTo (const void *targetClass) |
![]() | |
static Object | getCast (void *object, ClassPointer targetClassGetClassMethod, ClassPointer baseClassGetClassMethod) |
![]() | |
void * | vTable |
Pointer to the class's virtual table. |
# Detailed Description
Class Vector3D
Inherits from Object
Implements methods to operate on Vector3D structs.
Definition at line 32 of file Vector3D.h.
# Member Function Documentation
# absolute()
Compute the absulte values for the vector's components.
- Parameters
-
vector Vector to convert
- Returns
- Vector whose components are all absolute
Definition at line 316 of file Vector3D.h.
# areEqual()
Test if two vectors are equal.
- Parameters
-
a First vector b Second vector
- Returns
- True if all the components of both vectors are equal; false otherwise
Definition at line 792 of file Vector3D.h.
# dotProduct()
|
inlinestatic |
Compute the dot product of the provided vectors.
- Parameters
-
vectorA First vector vectorB Second vector
- Returns
- Dot product of the provided vectors
Definition at line 715 of file Vector3D.h.
# dotProductHighPrecision()
|
inlinestatic |
Compute with higher decimal precision the dot product of the provided vectors.
- Parameters
-
vectorA First vector vectorB Second vector
- Returns
- Dot product of the provided vectors
Definition at line 725 of file Vector3D.h.
# get()
Compute the difference vector between two provided vectors.
- Parameters
-
from Start vector to End vector
- Returns
- Difference vector between the provided vectors
Definition at line 295 of file Vector3D.h.
# getFromPixelVector()
|
inlinestatic |
Transform the provided vector in pixel coordinates into a normal 3D vector.
- Parameters
-
pixelVector Vector to transform
- Returns
- 3D vector
Definition at line 650 of file Vector3D.h.
# getFromScreenPixelVector()
|
inlinestatic |
Transform the provided vector in screen coordinates into a normal 3D vector.
- Parameters
-
screenPixelVector Vector to transform
- Returns
- 3D vector
Definition at line 662 of file Vector3D.h.
# getFromVector2D()
Extend the provided 2D vector to 3D.
- Parameters
-
vector2D 2D vector to extend z Z coordinate for the extended vector
- Returns
- Extended vector
Definition at line 643 of file Vector3D.h.
# getPlaneNormal()
|
inlinestatic |
Compute the normal to the plane defined by the provided vectors.
- Parameters
-
vectorA Common vector vectorB Second vector vectorC Third vector
- Returns
- Normal vector to the plane defined by AB and AC
Definition at line 452 of file Vector3D.h.
# getRelativeToCamera()
Compute the vector relative to the camera's position.
- Parameters
-
vector Vector to compute the relative vector of
- Returns
- Vector relative to the camera's position
Definition at line 441 of file Vector3D.h.
# getScale()
Compute the scale factor for the provided z coordinate.
- Parameters
-
z Z coordinate applyScalingMultiplier Flag to determine if the optics' scaling multiplier is applied to the result
- Returns
- Computed scale
Definition at line 735 of file Vector3D.h.
# intermediate()
Compute the intermediate vector between two provided vectors.
- Parameters
-
a First vector b Second vector
- Returns
- Intermediate vector between the provided vectors
Definition at line 328 of file Vector3D.h.
# isLeft()
Test if the vector point b is to the left of the vector ab.
- Parameters
-
a First vector b Second vector p Vector point to test
- Returns
- True if p is to the left of ab; false otherwise
Definition at line 778 of file Vector3D.h.
# isRight()
Test if the vector point b is to the right of the vector ab.
- Parameters
-
a First vector b Second vector p Vector point to test
- Returns
- True if p is to the right of ab; false otherwise
Definition at line 785 of file Vector3D.h.
# isValueInRange()
|
inlinestatic |
Test if a number is within a range.
- Parameters
-
number Number to test limitA First limit of the range limitB Second limit of the range
- Returns
- True if all the provided number is within the provided limits
Definition at line 799 of file Vector3D.h.
# isVectorInsideLine()
Test if vector point p is within the vector ab
- Parameters
-
p Vector point to test a First vector point of the vector onto which to test p b Second vector point of the vector onto which to test p
- Returns
- True if p lies in ab; false otherwise
Definition at line 811 of file Vector3D.h.
# length()
Compute the length of the provided vector.
- Parameters
-
vector Vector to compute the length of
- Returns
- Length of the provided vector
Definition at line 674 of file Vector3D.h.
# lengthProduct()
Compute the product of the lengths of the provided vectors.
- Parameters
-
vectorA First vector vectorB Second vector
- Returns
- Product of the lengths of the provided vectors
Definition at line 696 of file Vector3D.h.
# normalize()
Normalize the provided vector.
- Parameters
-
vector Vector to normalize
- Returns
- Normalized vector
Definition at line 288 of file Vector3D.h.
# perpendicularXPlane()
Compute the perpendicular vector to the X plane in the provided direction.
- Parameters
-
a Vector to compute the perpendicular of left Direction of the perpendicular vector
- Returns
- Perpendicular vector to the X plane
Definition at line 340 of file Vector3D.h.
# perpendicularYPlane()
Compute the perpendicular vector to the Y plane in the provided direction.
- Parameters
-
a Vector to compute the perpendicular of left Direction of the perpendicular vector
- Returns
- Perpendicular vector to the Y plane
Definition at line 360 of file Vector3D.h.
# perpendicularZPlane()
Compute the perpendicular vector to the Z plane in the provided direction.
- Parameters
-
a Vector to compute the perpendicular of left Direction of the perpendicular vector
- Returns
- Perpendicular vector to the Z plane
Definition at line 380 of file Vector3D.h.
# print()
Print the vector's components.
- Parameters
-
vector Vector to print x Screen x coordinate where to print y Screen y coordinate where to print
Definition at line 25 of file Vector3D.c.
# printRaw()
Print the vector's components without converting the underlying data type.
- Parameters
-
vector Vector to print x Screen x coordinate where to print y Screen y coordinate where to print
Definition at line 40 of file Vector3D.c.
# projectOnto()
Project the point p onto the vector ab.
- Parameters
-
p Vector point to project a First vector point of the vector onto which to project p b Second vector point of the vector onto which to project p
- Returns
- Projected vector point
Definition at line 478 of file Vector3D.h.
# projectOntoHighPrecision()
|
inlinestatic |
Project the point p onto the vector ab with higher decima precision.
- Parameters
-
p Vector point to project a First vector point of the vector onto which to project p b Second vector point of the vector onto which to project p
- Returns
- Projected vector point
Definition at line 517 of file Vector3D.h.
# rotate()
Rotate the vector according to the provided rotation.
- Parameters
-
vector Vector to rotate rotation Rotation to apply to the vector
- Returns
- Rotated vector
Definition at line 565 of file Vector3D.h.
# rotateXAxis()
Rotate the vector around the X axis.
- Parameters
-
vector Vector to rotate degrees Amount of degrees to rotate the vector
- Returns
- Rotated vector
Definition at line 589 of file Vector3D.h.
# rotateYAxis()
Rotate the vector around the Y axis.
- Parameters
-
vector Vector to rotate degrees Amount of degrees to rotate the vector
- Returns
- Rotated vector
Definition at line 607 of file Vector3D.h.
# rotateZAxis()
Rotate the vector around the Z axis.
- Parameters
-
vector Vector to rotate degrees Amount of degrees to rotate the vector
- Returns
- Rotated vector
Definition at line 625 of file Vector3D.h.
# scalarDivision()
Apply a scalar division over the vector's components
- Parameters
-
vector Vector to scale scalar Scalar divisor
- Returns
- Scaled vector
Definition at line 424 of file Vector3D.h.
# scalarProduct()
Apply a scalar product over the vector's components
- Parameters
-
vector Vector to scale scalar Scalar to multiply
- Returns
- Scaled vector
Definition at line 412 of file Vector3D.h.
# scale()
Scale the provided vector's components
- Parameters
-
vector Vector to scale scale Scale to apply to the vector's components
- Returns
- Scaled vector
Definition at line 400 of file Vector3D.h.
# squareLength()
|
inlinestatic |
Compute the squared length of the provided vector.
- Parameters
-
vector Vector to compute the square length of
- Returns
- Square length of the provided vector
Definition at line 686 of file Vector3D.h.
# sub()
Compute the difference vector between two provided vectors.
- Parameters
-
a End vector b Start vector
- Returns
- Difference vector between the provided vectors
Definition at line 309 of file Vector3D.h.
# sum()
Compute the addition vector between other two provided vectors.
- Parameters
-
a First vector b Second vector
- Returns
- Addition vector between the provided vectors
Definition at line 302 of file Vector3D.h.
# unit()
Get a unit vector on the provided axis.
- Parameters
-
axis Axis on which the vector should be (__X_AXIS, __Y_AXIS or __Z_AXIS)
- Returns
- Unit vector on the provided axis
Definition at line 276 of file Vector3D.h.
# zero()
|
inlinestatic |
Get a vector with all its members initialized to zero.
- Returns
- Pixel vector with all its members initialized to zero
# Member Data Documentation
# x
# y
# z
The documentation for this struct was generated from the following files:
- VUEngine-Core/source/Misc/Math/Vector3D.h
- VUEngine-Core/source/Misc/Types.h
- VUEngine-Core/source/Misc/Math/Vector3D.c