You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OK, so I'm adding parenting. This means that I'm adopting a node-based design to describe the scenegraph. Basically, you can parent Nodes (Models, Cameras, or just empty Nodes) to other Nodes to describe the scene tree (think of how Godot does it). It works well, is relatively simple, maps well to how 3D modelers should handle parenting, and should also be pretty useful for use in-game for segmenting parts of the game world or performing custom culling, for example.
However, to implement this, I have to add functions to get and set position, scale, and rotation, both for local (relative to parent) and world-based (relative to origin) variants. I wonder if it would be good to promote the wording on some of these functions to imply one set being the default, and the other being the "more specific" variant. For example:
Node.Position() // Local positionNode.WorldPosition() // World positionNode.SetPosition(positionvector.Vector)
Node.SetWorldPosition(positionvector.Vector)
Or vice-versa for the world variant being the default instead.
In how my API is currently designed, both local and world variants use the full name Node.SetWorldPosition(position vector.Vector), and Node.SetLocalPosition(position vector.Vector). Any thoughts?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
OK, so I'm adding parenting. This means that I'm adopting a node-based design to describe the scenegraph. Basically, you can parent Nodes (Models, Cameras, or just empty Nodes) to other Nodes to describe the scene tree (think of how Godot does it). It works well, is relatively simple, maps well to how 3D modelers should handle parenting, and should also be pretty useful for use in-game for segmenting parts of the game world or performing custom culling, for example.
However, to implement this, I have to add functions to get and set position, scale, and rotation, both for local (relative to parent) and world-based (relative to origin) variants. I wonder if it would be good to promote the wording on some of these functions to imply one set being the default, and the other being the "more specific" variant. For example:
Or vice-versa for the world variant being the default instead.
In how my API is currently designed, both local and world variants use the full name
Node.SetWorldPosition(position vector.Vector)
, andNode.SetLocalPosition(position vector.Vector)
. Any thoughts?Beta Was this translation helpful? Give feedback.
All reactions