Skip to content

Commit f0a427f

Browse files
committed
Added inverse_transform and fixes for Transform
inverse_transform from #7999 highlighted in-place character
1 parent 9f33baf commit f0a427f

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

Docs/python_api.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2794,14 +2794,18 @@ Describes a rotation for an object according to Unreal Engine's axis system.
27942794
- **Parameters:**
27952795
- `location` (_[carla.Location](#carla.Location)_)
27962796
- `rotation` (_[carla.Rotation](#carla.Rotation)<small> - degrees (pitch, yaw, roll)</small>_)
2797+
- <a name="carla.Transform.inverse_transform"></a>**<font color="#7fb800">inverse_transform</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_point**</font>)
2798+
Applies the inverse of `transform` by translating a 3D point in place from global to local coordinates using the current transformation as frame of reference.
2799+
- **Parameters:**
2800+
- `in_point` (_[carla.Vector3D](#carla.Vector3D)_) - Location in the space to which the inverse transformation will be applied.
27972801
- <a name="carla.Transform.transform"></a>**<font color="#7fb800">transform</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_point**</font>)
2798-
Translates a 3D point from local to global coordinates using the current transformation as frame of reference.
2802+
Translates a 3D point in place from local to global coordinates using the current transformation as frame of reference.
27992803
- **Parameters:**
2800-
- `in_point` (_[carla.Location](#carla.Location)_) - Location in the space to which the transformation will be applied.
2801-
- <a name="carla.Transform.transform_vector"></a>**<font color="#7fb800">transform_vector</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_vector**</font>)
2802-
Rotates a vector using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
2804+
- `in_point` (_[carla.Vector3D](#carla.Vector3D)_) - Location in the space to which the transformation will be applied.
2805+
- <a name="carla.Transform.transform_vector"></a>**<font color="#7fb800">transform_vector</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_point**</font>)
2806+
Rotates a vector in place using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
28032807
- **Parameters:**
2804-
- `in_vector` (_[carla.Vector3D](#carla.Vector3D)_) - Vector to which the transformation will be applied.
2808+
- `in_point` (_[carla.Vector3D](#carla.Vector3D)_) - Vector to which the transformation will be applied.
28052809

28062810
##### Getters
28072811
- <a name="carla.Transform.get_forward_vector"></a>**<font color="#7fb800">get_forward_vector</font>**(<font color="#00a6ed">**self**</font>)

PythonAPI/docs/geom.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,20 +438,29 @@
438438
- def_name: transform
439439
params:
440440
- param_name: in_point
441-
type: carla.Location
441+
type: carla.Vector3D
442442
doc: >
443443
Location in the space to which the transformation will be applied.
444444
doc: >
445-
Translates a 3D point from local to global coordinates using the current transformation as frame of reference.
445+
Translates a 3D point in place from local to global coordinates using the current transformation as frame of reference.
446+
# --------------------------------------
447+
- def_name: inverse_transform
448+
params:
449+
- param_name: in_point
450+
type: carla.Vector3D
451+
doc: >
452+
Location in the space to which the inverse transformation will be applied.
453+
doc: >
454+
Applies the inverse of `transform` by translating a 3D point in place from global to local coordinates using the current transformation as frame of reference.
446455
# --------------------------------------
447456
- def_name: transform_vector
448457
params:
449-
- param_name: in_vector
458+
- param_name: in_point
450459
type: carla.Vector3D
451460
doc: >
452461
Vector to which the transformation will be applied.
453462
doc: >
454-
Rotates a vector using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
463+
Rotates a vector in place using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
455464
# --------------------------------------
456465
- def_name: get_forward_vector
457466
return: carla.Vector3D

0 commit comments

Comments
 (0)