Class TSFRotation
Unit
Declaration
type TSFRotation = class(TX3DSingleField)
Description
X3D field representing a 3D rotation around an arbitrary axis.
Hierarchy
- TObject
- TPersistent
- TX3DFileItem
- TX3DFieldOrEvent
- TX3DField
- TX3DSingleField
- TSFRotation
Overview
Fields
Axis: TVector3; |
|
RotationRad: Single; |
Methods
constructor Create(const AParentNode: TX3DFileItem; const AExposed: boolean; const AName: String; const AnAxis: TVector3; const ARotationRad: Single); overload; |
|
constructor Create(const AParentNode: TX3DFileItem; const AExposed: boolean; const AName: String; const AValue: TVector4); overload; |
|
procedure ParseValue(Lexer: TX3DLexer; Reader: TX3DReader); override; |
|
function RotatedPoint(const pt: TVector3): TVector3; |
|
function Equals(SecondValue: TX3DField): boolean; override; |
|
function EqualsDefaultValue: boolean; override; |
|
function FastEqualsValue(SecondValue: TX3DField): boolean; override; |
|
procedure AssignLerp(const A: Double; Value1, Value2: TX3DField); override; |
|
function CanAssignLerp: boolean; override; |
|
procedure Assign(Source: TPersistent); override; |
|
procedure AssignValue(Source: TX3DField); override; |
|
procedure AssignDefaultValueFromValue; override; |
|
procedure UnassignDefaultValue; override; |
|
class function X3DType: String; override; |
|
class function CreateEvent(const AParentNode: TX3DFileItem; const AName: String; const AInEvent: boolean): TX3DEvent; override; |
|
procedure Send(const AValue: TVector4); overload; |
Properties
property Value: TVector4 read GetValue write SetValue; |
|
property ValueDeg: TVector4 read GetValueDeg write SetValueDeg; |
Description
Fields
Axis: TVector3; |
|
This item has no description. |
RotationRad: Single; |
|
This item has no description. |
Methods
constructor Create(const AParentNode: TX3DFileItem; const AExposed: boolean; const AName: String; const AnAxis: TVector3; const ARotationRad: Single); overload; |
|
This item has no description. |
constructor Create(const AParentNode: TX3DFileItem; const AExposed: boolean; const AName: String; const AValue: TVector4); overload; |
|
This item has no description. |
procedure ParseValue(Lexer: TX3DLexer; Reader: TX3DReader); override; |
|
This item has no description. |
function RotatedPoint(const pt: TVector3): TVector3; |
|
Rotate point Pt around Self. |
function Equals(SecondValue: TX3DField): boolean; override; |
|
This item has no description. Showing description inherited from TX3DField.Equals.
All descendants (that add some property that should be compared) should override this like Result := (inherited Equals(SecondValue)) and (SecondValue is TMyType) and (TMyType(SecondValue).MyProperty = MyProperty);
The floating-point fields may be compared with a small epsilon tolerance by this method. Note that this *doesn't* compare the default values of two fields instances. This compares only the current values of two fields instances, and eventually some other properties that affect parsing (like names for TSFEnum and TSFBitMask) or allowed future values (like TSFFloat.MustBeNonnegative). |
function EqualsDefaultValue: boolean; override; |
|
This item has no description. Showing description inherited from TX3DField.EqualsDefaultValue.
Whether the value is equal to default. Returns always |
function FastEqualsValue(SecondValue: TX3DField): boolean; override; |
|
This item has no description. Showing description inherited from TX3DField.FastEqualsValue. Compare value of this field, with other field, fast. This compares only the values of the fields, not other properties (it doesn't care about names of the fields or such, or default values; only current values). In other words, it compares only the things copied by AssignValue. This tries to compare very fast, which means that for large (multi-valued) fields it may give up and answer Default implementation in this class ( |
procedure AssignLerp(const A: Double; Value1, Value2: TX3DField); override; |
|
This item has no description. Showing description inherited from TX3DField.AssignLerp. Assigns value to this node calculated from linear interpolation between two given nodes Value1, Value2. Just like other lerp functions in our units (like CastleVectors.Lerp). Like AssignValue, this copies only the current value. All other properties (like Name, IsClauseNames, ValueFromIsClause, default value) are untouched. There are some special precautions for this:
|
function CanAssignLerp: boolean; override; |
|
This item has no description. Showing description inherited from TX3DField.CanAssignLerp. Is AssignLerp usable on this field type? Descendants implementors notes: In this class, this always returns |
procedure Assign(Source: TPersistent); override; |
|
This item has no description. |
procedure AssignValue(Source: TX3DField); override; |
|
This item has no description. Showing description inherited from TX3DField.AssignValue. Copies the current field value. Contrary to TPersistent.Assign, this doesn't copy the rest of properties. After setting, our ValueFromIsClause is always changed to
Descendants implementors notes: In this class, implementation takes care of setting our ValueFromIsClause to if Source is <appropriate class> then begin inherited; Value := Source.value; end else AssignValueRaiseInvalidClass(Source); |
procedure AssignDefaultValueFromValue; override; |
|
This item has no description. Showing description inherited from TX3DField.AssignDefaultValueFromValue. Set field's default value from the current value. Note that for now this doesn't guarantee that every possible field's value can be stored as default value. In case of trouble, it will silently record "no default is known" information, so e.g. EqualsDefaultValue will always return |
procedure UnassignDefaultValue; override; |
|
This item has no description. Showing description inherited from TX3DField.UnassignDefaultValue.
Remove default value, recording that "no default is known". In effect EqualsDefaultValue will always return |
class function X3DType: String; override; |
|
This item has no description. Showing description inherited from TX3DField.X3DType.
Field type in X3D, like |
class function CreateEvent(const AParentNode: TX3DFileItem; const AName: String; const AInEvent: boolean): TX3DEvent; override; |
|
This item has no description. Showing description inherited from TX3DField.CreateEvent. Create TX3DEvent descendant suitable as exposed event for this field. |
procedure Send(const AValue: TVector4); overload; |
|
This item has no description. |
Properties
property Value: TVector4 read GetValue write SetValue; |
|
Current rotation value, with last component expressing rotation in radians. This internally gets / sets values from Axis, RotationRad, it only presents them to you differently. |
property ValueDeg: TVector4 read GetValueDeg write SetValueDeg; |
|
Current rotation value, with last component expressing rotation in degrees. So this is just like Value, but last component is in degrees. This internally gets / sets values from Axis, RotationRad, it only presents them to you differently. |
Generated by PasDoc 0.16.0-snapshot.