GlobalTransform — Aspose.3D FOSS for Python API Reference
Enumerations
GlobalTransform एक है केवल-पढ़ने योग्य का स्नैपशॉट Node’s विश्व-स्थान परिवर्तन। इसे प्राप्त किया जाता है द्वारा node.global_transform और प्रतिबिंबित करता है नोड के अपने Transform सीन रूट तक प्रत्येक पूर्वज के ट्रांसफ़ॉर्म के साथ।.
सभी गुण केवल-पढ़ने योग्य हैं। नोड की स्थिति बदलने के लिए, नोड के स्थानीय Transform के बजाय।.
Enumerations: aspose.threed
from aspose.threed import GlobalTransformGlobalTransform सामान्यतः सीधे इंस्टैंशिएट नहीं किया जाता; आप इसे … से प्राप्त करते हैं node.global_transform.
Enumerations
| Enumerations | Enumerations | Enumerations |
|---|---|---|
translation | Vector3 | नोड की विश्व-स्थान स्थिति |
scale | Vector3 | नोड का विश्व-स्थान स्केल |
rotation | Quaternion | क्वाटरनियन के रूप में विश्व-स्थान घूर्णन |
euler_angles | Vector3 | रैडियन में यूलेर कोणों के रूप में विश्व-स्थान घूर्णन (roll, pitch, yaw) |
transform_matrix | Matrix4 | पूर्ण 4×4 विश्व-स्थान रूपांतरण मैट्रिक्स |
Enumerations
from aspose.threed import Scene
from aspose.threed.utilities import Vector3
import math
scene = Scene()
# Create a parent node at (10, 0, 0)
parent = scene.root_node.create_child_node("parent")
parent.transform.translation = Vector3(10.0, 0.0, 0.0)
# Create a child node at (5, 0, 0) relative to parent
child = parent.create_child_node("child")
child.transform.translation = Vector3(5.0, 0.0, 0.0)
# Read world-space position
gt = child.global_transform
print(gt.translation) # Vector3(15.0, 0.0, 0.0)
print(gt.scale) # Vector3(1.0, 1.0, 1.0)
# Access the 4x4 matrix directly
mat = gt.transform_matrix
print(mat.m03) # 15.0 — world-space X translation
# Euler angles in degrees
angles = gt.euler_angles
print(math.degrees(angles.x)) # 0.0 (no rotation)
# Using evaluate_global_transform to include geometric offset
manual_mat = child.evaluate_global_transform(True)Enumerations
GlobalTransformसमय पर गणना किया जाता हैnode.global_transformपहुंचा जाता है; यह है नहीं यदि किसी पैरेंट नोड काTransformबाद में परिवर्तन होता है।.- Enumerations
scaleपर गुण का नामGlobalTransformहैscale(नहींscaling). स्थानीयTransformका उपयोग करता हैscalingलिखने योग्य स्केल गुण के लिए।.