Saturday, September 29, 2018

physics - What are the properties of "position, velocity, acceleration, rotation" collectively named?


They say naming things is one of the hardest problems in computer programming. They were right.


Given the pseudocode below, what is a more appropriate name for this collection of properties? "Course", "Route", "Heading", "Orientation" all don't capture it.


class NewtonianStuff { // <-- Needs a better name
vec3 position, velocity, acceleration; // <-- What is this group called
quat rotation;
};


class SpaceShip {
NewtonianStuff xxxxxx; // <-- What do you call that
};

Perhaps that collection is too abstract. What is the formal name for this collection of properties?


vec3 position, velocity, acceleration;

The best I can come up with is "PositionAndDerivatives", which doesn't really flow.



Answer



The position and rotation (and scale) are generally referred to as the transform.



Velocity, acceleration, force, impulse, etc are usually just lumped together as "physics state" or "body" (which might also have handles to the shape of the physical object or any bounding shapes, or those might be part of a separate "collider"). I don't believe there is a formal name used in games for this collection of properties, especially as the properties used varies for each game / physics engines.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...