Class TCasScriptMatrix3d
Unit
Declaration
type TCasScriptMatrix3d = class(specialize TCasScriptMatrix<TCasScriptVec3d,TMatrix3Double,TVector3Double>)
Description
This item has no description.
Source: castlescript/castlescriptvectors.pas (line 174).
Hierarchy
- TObject
- TCasScriptExpression
- TCasScriptValue
- TCasScriptMatrix
- TCasScriptMatrix3d
Overview
Methods
| Protected | function CoreExecute: TCasScriptValue; virtual; abstract; |
| Public | function Execute: TCasScriptValue; |
| Public | function TryExecuteMath: TCasScriptValue; |
| Public | function AsFloat(const ADefaultValue: Float = 0): Float; |
| Public | function AsInt(const ADefaultValue: Int64 = 0): Int64; |
| Public | function AsString(const ADefaultValue: String = ''): string; |
| Public | function AsBool(const ADefaultValue: boolean = false): boolean; |
| Public | procedure FreeByParentExpression; |
| Protected | function CoreExecute: TCasScriptValue; override; |
| Public | constructor Create(const AWriteable: boolean); virtual; |
| Public | procedure AssignValue(Source: TCasScriptValue); virtual; abstract; |
| Public | procedure AssignValue(Source: TCasScriptValue); override; |
Properties
| Public | property Environment: TCasScriptEnvironment read FEnvironment write FEnvironment; |
| Public | property Writeable: boolean read FWriteable write FWriteable; |
| Public | property OwnedByParentExpression: boolean
read FOwnedByParentExpression write FOwnedByParentExpression
default true; |
| Public | property Name: string read FName write FName; |
| Public | property ValueAssigned: boolean read FValueAssigned write FValueAssigned
default false; |
| Public | property Value: TMatrixXxx read FValue write SetValue; |
Description
Methods
| Protected | function CoreExecute: TCasScriptValue; virtual; abstract; |
|
More internal version of Execute. This doesn't necessarily check floating-point exceptions. Execute actually calls Also this doesn't try to convert EIntError and EMathError to ECasScriptAnyMathError. This is done by Execute. When one CastleScript | |
| Public | function Execute: TCasScriptValue; |
|
Execute and calculate this expression. Returned value is owned by this object. Which should be comfortable for you usually, as you do not have to worry about freeing it. Also, it allows us to make various optimizations to avoid creating/destroying lots of temporary TCasScriptExpression instances during calculation of complex expression. The disadvantage of this is that returned object value is valid only until you executed this same expression again, or until you freed this expression. If you need to remember the execute result for longer, you have to copy it somewhere. For example you can do
{ This will always work, thanks to virtual TCasScriptValue.Create
and AssignValue methods. }
Copy := TCasScriptValue(ReturnedValue.ClassType).Create;
Copy.AssignValue(ReturnedValue);
Exceptions raised
| |
| Public | function TryExecuteMath: TCasScriptValue; |
|
Try to execute expression, or return This is useful to secure you against math arguments errors ('ln(-3)', 'sqrt(-3)') but still raises normal exception on other ECasScriptError errors (like invalid argument type for function). | |
| Public | function AsFloat(const ADefaultValue: Float = 0): Float; |
|
Execute expression, return the result as a simple float value. It assumes that the expression is written to always return float. To easily create such expression, use ParseFloatExpression. | |
| Public | function AsInt(const ADefaultValue: Int64 = 0): Int64; |
|
Execute expression, return the result as a simple integer value. It assumes that the expression is written to always return integer. To easily create such expression, use ParseIntExpression. | |
| Public | function AsString(const ADefaultValue: String = ''): string; |
|
Execute expression, return the result as a simple string value. It assumes that the expression is written to always return string. To easily create such expression, use ParseStringExpression. | |
| Public | function AsBool(const ADefaultValue: boolean = false): boolean; |
|
Execute expression, return the result as a simple boolean value. It assumes that the expression is written to always return boolean. To easily create such expression, use ParseBoolExpression. | |
| Public | procedure FreeByParentExpression; |
|
Call Free, but only if this is not TCasScriptValue with OwnedByParentExpression = false. (This cannot be implemented cleanly, as virtual procedure, since it must work when Self is | |
| Protected | function CoreExecute: TCasScriptValue; override; |
|
This item has no description. Showing description inherited from TCasScriptExpression.CoreExecute. More internal version of Execute. This doesn't necessarily check floating-point exceptions. Execute actually calls Also this doesn't try to convert EIntError and EMathError to ECasScriptAnyMathError. This is done by Execute. When one CastleScript | |
| Public | constructor Create(const AWriteable: boolean); virtual; |
|
This item has no description. | |
| Public | procedure AssignValue(Source: TCasScriptValue); virtual; abstract; |
|
Assign value from Source to Self. Exceptions raised
| |
| Public | procedure AssignValue(Source: TCasScriptValue); override; |
|
This item has no description. Showing description inherited from TCasScriptValue.AssignValue. Assign value from Source to Self. | |
Properties
| Public | property Environment: TCasScriptEnvironment read FEnvironment write FEnvironment; |
|
Environment (outside information) for this expression. May be | |
| Public | property Writeable: boolean read FWriteable write FWriteable; |
|
Is this value writeable. If not, this will not be allowed to change by CastleScript assignment and such functions. Note that Writeable = | |
| Public | property OwnedByParentExpression: boolean
read FOwnedByParentExpression write FOwnedByParentExpression
default true; |
|
This item has no description. | |
| Public | property Name: string read FName write FName; |
|
Name of this value, or '' if not named. Named value can be recognized in expressions by CastleScriptParser. | |
| Public | property ValueAssigned: boolean read FValueAssigned write FValueAssigned
default false; |
|
Set to This allows the caller to know which variables were assigned during script execution, which is useful if changes to CastleScript variables should be propagated to some other things after the script finished execution. This is essential for behavior in VRML/X3D Script node. Descendants note: you have to set this to | |
| Public | property Value: TMatrixXxx read FValue write SetValue; |
|
This item has no description. | |
Generated by PasDoc 0.17.0.snapshot.