Struct Frame3f
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
Constructors
Frame3f(Frame3f)
Declaration
public Frame3f(Frame3f copy)
Parameters
Frame3f(Vector3d)
Declaration
public Frame3f(Vector3d origin)
Parameters
Frame3f(Vector3d, Vector3d)
Declaration
public Frame3f(Vector3d origin, Vector3d setZ)
Parameters
Frame3f(Vector3f)
Declaration
public Frame3f(Vector3f origin)
Parameters
Frame3f(Vector3f, Quaternionf)
Declaration
public Frame3f(Vector3f origin, Quaternionf orientation)
Parameters
Frame3f(Vector3f, Vector3f)
Declaration
public Frame3f(Vector3f origin, Vector3f setZ)
Parameters
Frame3f(Vector3f, Vector3f, Vector3f, Vector3f)
Declaration
public Frame3f(Vector3f origin, Vector3f x, Vector3f y, Vector3f z)
Parameters
Frame3f(Vector3f, Vector3f, Int32)
Declaration
public Frame3f(Vector3f origin, Vector3f setAxis, int nAxis)
Parameters
Fields
Identity
Declaration
public static readonly Frame3f Identity
Field Value
Properties
Origin
Declaration
public Vector3f Origin { get; set; }
Property Value
Rotation
Declaration
public Quaternionf Rotation { get; set; }
Property Value
X
Declaration
public Vector3f X { get; }
Property Value
Y
Declaration
public Vector3f Y { get; }
Property Value
Z
Declaration
public Vector3f Z { get; }
Property Value
Methods
AlignAxis(Int32, Vector3f)
Declaration
public void AlignAxis(int nAxis, Vector3f vTo)
Parameters
ConstrainedAlignAxis(Int32, Vector3f, Vector3f)
Declaration
public void ConstrainedAlignAxis(int nAxis, Vector3f vTo, Vector3f vAround)
Parameters
DistanceToPlane(Vector3f, Int32)
distance from p to frame-axes-plane perpendicular to normal axis
Declaration
public float DistanceToPlane(Vector3f p, int nNormal)
Parameters
Returns
DistanceToPlaneSigned(Vector3f, Int32)
signed distance from p to frame-axes-plane perpendicular to normal axis
Declaration
public float DistanceToPlaneSigned(Vector3f p, int nNormal)
Parameters
Returns
EpsilonEqual(Frame3f, Single)
Declaration
public bool EpsilonEqual(Frame3f f2, float epsilon)
Parameters
Returns
FromFrame(ref Box3d)
Map box from local frame coordinates into "world" coordinates
Declaration
public Box3d FromFrame(ref Box3d box)
Parameters
Type |
Name |
Description |
Box3d |
box |
|
Returns
FromFrame(ref Box3f)
Map box from local frame coordinates into "world" coordinates
Declaration
public Box3f FromFrame(ref Box3f box)
Parameters
Type |
Name |
Description |
Box3f |
box |
|
Returns
FromFrame(Frame3f)
Map frame from local frame coordinates into "world" coordinates
Declaration
public Frame3f FromFrame(Frame3f f)
Parameters
Returns
FromFrame(ref Frame3f)
Map frame from local frame coordinates into "world" coordinates
Declaration
public Frame3f FromFrame(ref Frame3f f)
Parameters
Returns
FromFrame(Quaternionf)
Map quaternion from local frame coordinates into "world" coordinates
Declaration
public Quaternionf FromFrame(Quaternionf q)
Parameters
Returns
FromFrame(ref Quaternionf)
Map quaternion from local frame coordinates into "world" coordinates
Declaration
public Quaternionf FromFrame(ref Quaternionf q)
Parameters
Returns
FromFrame(Ray3f)
Map ray from local frame coordinates into "world" coordinates
Declaration
public Ray3f FromFrame(Ray3f r)
Parameters
Type |
Name |
Description |
Ray3f |
r |
|
Returns
FromFrame(ref Ray3f)
Map ray from local frame coordinates into "world" coordinates
Declaration
public Ray3f FromFrame(ref Ray3f r)
Parameters
Type |
Name |
Description |
Ray3f |
r |
|
Returns
FromFrameP(Vector2f, Int32)
Declaration
[Obsolete("replaced with FromPlaneUV")]
public Vector3f FromFrameP(Vector2f v, int nPlaneNormalAxis)
Parameters
Returns
FromFrameP(Vector3d)
Map point from local frame coordinates into "world" coordinates
Declaration
public Vector3d FromFrameP(Vector3d v)
Parameters
Returns
FromFrameP(ref Vector3d)
Map point from local frame coordinates into "world" coordinates
Declaration
public Vector3d FromFrameP(ref Vector3d v)
Parameters
Returns
FromFrameP(Vector3f)
Map point from local frame coordinates into "world" coordinates
Declaration
public Vector3f FromFrameP(Vector3f v)
Parameters
Returns
FromFrameP(ref Vector3f)
Map point from local frame coordinates into "world" coordinates
Declaration
public Vector3f FromFrameP(ref Vector3f v)
Parameters
Returns
FromFrameV(Vector3d)
Map vector from local frame coordinates into "world" coordinates
Declaration
public Vector3d FromFrameV(Vector3d v)
Parameters
Returns
FromFrameV(ref Vector3d)
Map vector from local frame coordinates into "world" coordinates
Declaration
public Vector3d FromFrameV(ref Vector3d v)
Parameters
Returns
FromFrameV(Vector3f)
Map vector from local frame coordinates into "world" coordinates
Declaration
public Vector3f FromFrameV(Vector3f v)
Parameters
Returns
FromFrameV(ref Vector3f)
Map vector from local frame coordinates into "world" coordinates
Declaration
public Vector3f FromFrameV(ref Vector3f v)
Parameters
Returns
FromPlaneUV(Vector2f, Int32)
map from 2D coordinates in frame-axes plane perpendicular to normal axis, to 3D
[TODO] check that mapping preserves orientation?
Declaration
public Vector3f FromPlaneUV(Vector2f v, int nPlaneNormalAxis)
Parameters
Returns
GetAxis(Int32)
Declaration
public Vector3f GetAxis(int nAxis)
Parameters
Type |
Name |
Description |
Int32 |
nAxis |
|
Returns
Interpolate(Frame3f, Frame3f, Single)
Interpolate between two frames - Lerp for origin, Slerp for rotation
Declaration
public static Frame3f Interpolate(Frame3f f1, Frame3f f2, float t)
Parameters
Returns
ProjectToPlane(Vector3f, Int32)
3D projection of point p onto frame-axis plane orthogonal to normal axis
Declaration
public Vector3f ProjectToPlane(Vector3f p, int nNormal)
Parameters
Returns
RayPlaneIntersection(Vector3f, Vector3f, Int32)
Compute intersection of ray with plane passing through frame origin, normal
to the specified axis.
If the ray is parallel to the plane, no intersection can be found, and
we return Vector3f.Invalid
Declaration
public Vector3f RayPlaneIntersection(Vector3f ray_origin, Vector3f ray_direction, int nAxisAsNormal)
Parameters
Returns
Rotate(Quaternionf)
Declaration
public void Rotate(Quaternionf q)
Parameters
RotateAround(Vector3f, Quaternionf)
Declaration
public void RotateAround(Vector3f point, Quaternionf q)
Parameters
RotateAroundAxes(Quaternionf)
this rotates the frame around its own axes, rather than around the world axes,
which is what Rotate() does. So, RotateAroundAxis(AxisAngleD(Z,180)) is equivalent
to Rotate(AxisAngleD(My_AxisZ,180)).
Declaration
public void RotateAroundAxes(Quaternionf q)
Parameters
Rotated(Quaternionf)
Declaration
public Frame3f Rotated(Quaternionf q)
Parameters
Returns
Rotated(Single, Int32)
Declaration
public Frame3f Rotated(float fAngle, int nAxis)
Parameters
Returns
RotatedAround(Vector3f, Quaternionf)
Declaration
public Frame3f RotatedAround(Vector3f point, Quaternionf q)
Parameters
Returns
Scale(Vector3f)
Declaration
public void Scale(Vector3f scale)
Parameters
Scale(Single)
Declaration
public void Scale(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Scaled(Vector3f)
Declaration
public Frame3f Scaled(Vector3f scale)
Parameters
Returns
Scaled(Single)
Declaration
public Frame3f Scaled(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Returns
SolveMinRotation(Frame3f, Frame3f)
Declaration
public static Frame3f SolveMinRotation(Frame3f source, Frame3f target)
Parameters
Returns
ToFrame(ref Box3d)
Map box into local coordinates of Frame
Declaration
public Box3d ToFrame(ref Box3d box)
Parameters
Type |
Name |
Description |
Box3d |
box |
|
Returns
ToFrame(ref Box3f)
Map box into local coordinates of Frame
Declaration
public Box3f ToFrame(ref Box3f box)
Parameters
Type |
Name |
Description |
Box3f |
box |
|
Returns
ToFrame(Frame3f)
Map frame into local coordinates of Frame
Declaration
public Frame3f ToFrame(Frame3f f)
Parameters
Returns
ToFrame(ref Frame3f)
Map frame into local coordinates of Frame
Declaration
public Frame3f ToFrame(ref Frame3f f)
Parameters
Returns
ToFrame(Quaternionf)
Map quaternion into local coordinates of Frame
Declaration
public Quaternionf ToFrame(Quaternionf q)
Parameters
Returns
ToFrame(ref Quaternionf)
Map quaternion into local coordinates of Frame
Declaration
public Quaternionf ToFrame(ref Quaternionf q)
Parameters
Returns
ToFrame(Ray3f)
Map ray into local coordinates of Frame
Declaration
public Ray3f ToFrame(Ray3f r)
Parameters
Type |
Name |
Description |
Ray3f |
r |
|
Returns
ToFrame(ref Ray3f)
Map ray into local coordinates of Frame
Declaration
public Ray3f ToFrame(ref Ray3f r)
Parameters
Type |
Name |
Description |
Ray3f |
r |
|
Returns
ToFrameP(Vector3d)
Map point into local coordinates of Frame
Declaration
public Vector3d ToFrameP(Vector3d v)
Parameters
Returns
ToFrameP(ref Vector3d)
Map point into local coordinates of Frame
Declaration
public Vector3d ToFrameP(ref Vector3d v)
Parameters
Returns
ToFrameP(Vector3f)
Map point into local coordinates of Frame
Declaration
public Vector3f ToFrameP(Vector3f v)
Parameters
Returns
ToFrameP(ref Vector3f)
Map point into local coordinates of Frame
Declaration
public Vector3f ToFrameP(ref Vector3f v)
Parameters
Returns
ToFrameV(Vector3d)
Map vector into local coordinates of Frame
Declaration
public Vector3d ToFrameV(Vector3d v)
Parameters
Returns
ToFrameV(ref Vector3d)
Map vector into local coordinates of Frame
Declaration
public Vector3d ToFrameV(ref Vector3d v)
Parameters
Returns
ToFrameV(Vector3f)
Map vector into local coordinates of Frame
Declaration
public Vector3f ToFrameV(Vector3f v)
Parameters
Returns
ToFrameV(ref Vector3f)
Map vector into local coordinates of Frame
Declaration
public Vector3f ToFrameV(ref Vector3f v)
Parameters
Returns
ToPlaneUV(Vector3f, Int32)
Project p onto plane axes
[TODO] check that mapping preserves orientation?
Declaration
public Vector2f ToPlaneUV(Vector3f p, int nNormal)
Parameters
Returns
ToPlaneUV(Vector3f, Int32, Int32, Int32)
Declaration
[Obsolete("Use explicit ToPlaneUV instead")]
public Vector2f ToPlaneUV(Vector3f p, int nNormal, int nAxis0 = -1, int nAxis1 = -1)
Parameters
Returns
ToString()
Declaration
public override string ToString()
Returns
Overrides
ToString(String)
Declaration
public string ToString(string fmt)
Parameters
Type |
Name |
Description |
String |
fmt |
|
Returns
Translate(Vector3f)
Declaration
public void Translate(Vector3f v)
Parameters
Translated(Vector3f)
Declaration
public Frame3f Translated(Vector3f v)
Parameters
Returns
Translated(Single, Int32)
Declaration
public Frame3f Translated(float fDistance, int nAxis)
Parameters
Returns