C# Class Math3D, VisualizationFramework-Unity

Mostrar archivo Open project: rygo6/VisualizationFramework-Unity Class Usage Examples

Public Methods

Method Description
AddVectorLength ( Vector3 vector, float size ) : Vector3
AngleVectorPlane ( Vector3 vector, Vector3 normal ) : float
ClosestPointsOnTwoLines ( Vector3 &closestPointLine1, Vector3 &closestPointLine2, Vector3 linePoint1, Vector3 lineVec1, Vector3 linePoint2, Vector3 lineVec2 ) : bool
DotProductAngle ( Vector3 vec1, Vector3 vec2 ) : float
GetForwardVector ( Quaternion q ) : Vector3
GetRightVector ( Quaternion q ) : Vector3
GetUpVector ( Quaternion q ) : Vector3
Init ( ) : void
LineLineIntersection ( Vector3 &intersection, Vector3 linePoint1, Vector3 lineVec1, Vector3 linePoint2, Vector3 lineVec2 ) : bool
LinePlaneIntersection ( Vector3 &intersection, Vector3 linePoint, Vector3 lineVec, Vector3 planeNormal, Vector3 planePoint ) : bool
LookRotationExtended ( GameObject &gameObjectInOut, Vector3 alignWithVector, Vector3 alignWithNormal, Vector3 customForward, Vector3 customUp ) : void
PlaneFrom3Points ( Vector3 &planeNormal, Vector3 &planePoint, Vector3 pointA, Vector3 pointB, Vector3 pointC ) : void
PlanePlaneIntersection ( Vector3 &linePoint, Vector3 &lineVec, Vector3 plane1Normal, Vector3 plane1Position, Vector3 plane2Normal, Vector3 plane2Position ) : bool
PositionFromMatrix ( Matrix4x4 m ) : Vector3
PreciseAlign ( GameObject &gameObjectInOut, Vector3 alignWithVector, Vector3 alignWithNormal, Vector3 alignWithPosition, Vector3 triangleForward, Vector3 triangleNormal, Vector3 trianglePosition ) : void
ProjectPointOnLine ( Vector3 linePoint, Vector3 lineVec, Vector3 point ) : Vector3
ProjectPointOnPlane ( Vector3 planeNormal, Vector3 planePoint, Vector3 point ) : Vector3
ProjectVectorOnPlane ( Vector3 planeNormal, Vector3 vector ) : Vector3
QuaternionFromMatrix ( Matrix4x4 m ) : Quaternion
SetVectorLength ( Vector3 vector, float size ) : Vector3
SignedDistancePlanePoint ( Vector3 planeNormal, Vector3 planePoint, Vector3 point ) : float
SignedDotProduct ( Vector3 vectorA, Vector3 vectorB, Vector3 normal ) : float
SubtractRotation ( Quaternion B, Quaternion A ) : Quaternion
TransformWithParent ( Quaternion &childRotation, Vector3 &childPosition, Quaternion parentRotation, Vector3 parentPosition, Quaternion startParentRotation, Vector3 startParentPosition, Quaternion startChildRotation, Vector3 startChildPosition ) : void
VectorsToTransform ( GameObject &gameObjectInOut, Vector3 positionVector, Vector3 directionVector, Vector3 normalVector ) : void

Method Details

AddVectorLength() public static method

public static AddVectorLength ( Vector3 vector, float size ) : Vector3
vector Vector3
size float
return Vector3

AngleVectorPlane() public static method

public static AngleVectorPlane ( Vector3 vector, Vector3 normal ) : float
vector Vector3
normal Vector3
return float

ClosestPointsOnTwoLines() public static method

public static ClosestPointsOnTwoLines ( Vector3 &closestPointLine1, Vector3 &closestPointLine2, Vector3 linePoint1, Vector3 lineVec1, Vector3 linePoint2, Vector3 lineVec2 ) : bool
closestPointLine1 Vector3
closestPointLine2 Vector3
linePoint1 Vector3
lineVec1 Vector3
linePoint2 Vector3
lineVec2 Vector3
return bool

DotProductAngle() public static method

public static DotProductAngle ( Vector3 vec1, Vector3 vec2 ) : float
vec1 Vector3
vec2 Vector3
return float

GetForwardVector() public static method

public static GetForwardVector ( Quaternion q ) : Vector3
q Quaternion
return Vector3

GetRightVector() public static method

public static GetRightVector ( Quaternion q ) : Vector3
q Quaternion
return Vector3

GetUpVector() public static method

public static GetUpVector ( Quaternion q ) : Vector3
q Quaternion
return Vector3

Init() public static method

public static Init ( ) : void
return void

LineLineIntersection() public static method

public static LineLineIntersection ( Vector3 &intersection, Vector3 linePoint1, Vector3 lineVec1, Vector3 linePoint2, Vector3 lineVec2 ) : bool
intersection Vector3
linePoint1 Vector3
lineVec1 Vector3
linePoint2 Vector3
lineVec2 Vector3
return bool

LinePlaneIntersection() public static method

public static LinePlaneIntersection ( Vector3 &intersection, Vector3 linePoint, Vector3 lineVec, Vector3 planeNormal, Vector3 planePoint ) : bool
intersection Vector3
linePoint Vector3
lineVec Vector3
planeNormal Vector3
planePoint Vector3
return bool

LookRotationExtended() public static method

public static LookRotationExtended ( GameObject &gameObjectInOut, Vector3 alignWithVector, Vector3 alignWithNormal, Vector3 customForward, Vector3 customUp ) : void
gameObjectInOut GameObject
alignWithVector Vector3
alignWithNormal Vector3
customForward Vector3
customUp Vector3
return void

PlaneFrom3Points() public static method

public static PlaneFrom3Points ( Vector3 &planeNormal, Vector3 &planePoint, Vector3 pointA, Vector3 pointB, Vector3 pointC ) : void
planeNormal Vector3
planePoint Vector3
pointA Vector3
pointB Vector3
pointC Vector3
return void

PlanePlaneIntersection() public static method

public static PlanePlaneIntersection ( Vector3 &linePoint, Vector3 &lineVec, Vector3 plane1Normal, Vector3 plane1Position, Vector3 plane2Normal, Vector3 plane2Position ) : bool
linePoint Vector3
lineVec Vector3
plane1Normal Vector3
plane1Position Vector3
plane2Normal Vector3
plane2Position Vector3
return bool

PositionFromMatrix() public static method

public static PositionFromMatrix ( Matrix4x4 m ) : Vector3
m Matrix4x4
return Vector3

PreciseAlign() public static method

public static PreciseAlign ( GameObject &gameObjectInOut, Vector3 alignWithVector, Vector3 alignWithNormal, Vector3 alignWithPosition, Vector3 triangleForward, Vector3 triangleNormal, Vector3 trianglePosition ) : void
gameObjectInOut GameObject
alignWithVector Vector3
alignWithNormal Vector3
alignWithPosition Vector3
triangleForward Vector3
triangleNormal Vector3
trianglePosition Vector3
return void

ProjectPointOnLine() public static method

public static ProjectPointOnLine ( Vector3 linePoint, Vector3 lineVec, Vector3 point ) : Vector3
linePoint Vector3
lineVec Vector3
point Vector3
return Vector3

ProjectPointOnPlane() public static method

public static ProjectPointOnPlane ( Vector3 planeNormal, Vector3 planePoint, Vector3 point ) : Vector3
planeNormal Vector3
planePoint Vector3
point Vector3
return Vector3

ProjectVectorOnPlane() public static method

public static ProjectVectorOnPlane ( Vector3 planeNormal, Vector3 vector ) : Vector3
planeNormal Vector3
vector Vector3
return Vector3

QuaternionFromMatrix() public static method

public static QuaternionFromMatrix ( Matrix4x4 m ) : Quaternion
m Matrix4x4
return Quaternion

SetVectorLength() public static method

public static SetVectorLength ( Vector3 vector, float size ) : Vector3
vector Vector3
size float
return Vector3

SignedDistancePlanePoint() public static method

public static SignedDistancePlanePoint ( Vector3 planeNormal, Vector3 planePoint, Vector3 point ) : float
planeNormal Vector3
planePoint Vector3
point Vector3
return float

SignedDotProduct() public static method

public static SignedDotProduct ( Vector3 vectorA, Vector3 vectorB, Vector3 normal ) : float
vectorA Vector3
vectorB Vector3
normal Vector3
return float

SubtractRotation() public static method

public static SubtractRotation ( Quaternion B, Quaternion A ) : Quaternion
B Quaternion
A Quaternion
return Quaternion

TransformWithParent() public static method

public static TransformWithParent ( Quaternion &childRotation, Vector3 &childPosition, Quaternion parentRotation, Vector3 parentPosition, Quaternion startParentRotation, Vector3 startParentPosition, Quaternion startChildRotation, Vector3 startChildPosition ) : void
childRotation Quaternion
childPosition Vector3
parentRotation Quaternion
parentPosition Vector3
startParentRotation Quaternion
startParentPosition Vector3
startChildRotation Quaternion
startChildPosition Vector3
return void

VectorsToTransform() public static method

public static VectorsToTransform ( GameObject &gameObjectInOut, Vector3 positionVector, Vector3 directionVector, Vector3 normalVector ) : void
gameObjectInOut GameObject
positionVector Vector3
directionVector Vector3
normalVector Vector3
return void