i would like to know how blitz3d's TFormVector works. do you know? this is the example…
- User
i would like to know how blitz3d's TFormVector works. do you know?
this is the example code in b3d, the result shows at the bottom given the INPUT#1 #2 and #3
p = CreatePivot()
PositionEntity p, 10, 20, 30 ; THIS IS IGNORED BY TFORMVECTOR TurnEntity p, -5, -15, 25 ; INPUT #1
; Question: what would happen if we took one step 'forward'? ; The local vector corresponding to one step forward is (0,0,1) ; in the pivot's local space. We need the global version.
TFormVector 0,0,1, p,0 ; 0,0,1 is INPUT #2, 0 at the end is world 0,0,0 INPUT #3
message$ = "'One step forward' vector is ( " message = message + TFormedX() + ", " + TFormedY() + ", " + TFormedZ() + " )"
Text 70, 180, message ; RESULTING VECTOR: 0.2578, 0.0715, 0.96225
NOTES:
- TFormVector doesn't take position into account, while TFormPoint does.
- You might want to know which direction the vertex's normal is pointing in the world/game, so you use: TFormVector VertexNX,VertexNY,VertexNZ,source,0 (world 0,0,0)
- TFormVector is for finding out stuff about a direction.
Can you convert the example in C++ code w/o external libs.
- Assistant
- User
prog.cc:20:21: error: expected type-specifier before '(' token 20 | Vector3 operator(float scalar) const { | ^ prog.cc: In member function 'Vector3& Vector3::normalize()': prog.cc:16:16: error: invalid initialization of non-const reference of type 'Vector3&' from an rvalue of type 'Vector3*' 16 | return this; | ^~~~
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.