ggmolvis.world

World is the class that represents the world transformations of an object. It contains the location, rotation, and scale of the object.

Classes

class ggmolvis.world.WorldTransformation(*, coordinates: List[float] | List[List[float]])[source]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class ggmolvis.world.Location(*, location: List[float] | List[List[float]])[source]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class ggmolvis.world.Rotation(*, rotation: List[float] | List[List[float]])[source]
from_quaternion(quaternion)[source]

Set the rotation from a quaternion

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

property quaternion

Return the quaternion representation of the rotation

class ggmolvis.world.Scale(*, scale: List[float] | List[List[float]])[source]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class ggmolvis.world.World(location=None, rotation=None, scale=None)[source]
property matrix_world

Return the 4D world matrix

Classes

Location(*, location)

Rotation(*, rotation)

Scale(*, scale)

World([location, rotation, scale])

WorldTransformation(*, coordinates)