Skip to content

Commit

Permalink
Added inverse_transform and fixes for Transform
Browse files Browse the repository at this point in the history
inverse_transform from carla-simulator#7999
highlighted in-place character
  • Loading branch information
Daraan committed Sep 6, 2024
1 parent e1e4bb0 commit f4c94e8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
14 changes: 9 additions & 5 deletions Docs/python_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2794,14 +2794,18 @@ Describes a rotation for an object according to Unreal Engine's axis system.
- **Parameters:**
- `location` (_[carla.Location](#carla.Location)_)
- `rotation` (_[carla.Rotation](#carla.Rotation)<small> - degrees (pitch, yaw, roll)</small>_)
- <a name="carla.Transform.inverse_transform"></a>**<font color="#7fb800">inverse_transform</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_point**</font>)
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.
- **Parameters:**
- `in_point` (_[carla.Vector3D](#carla.Vector3D)_) - Location in the space to which the inverse transformation will be applied.
- <a name="carla.Transform.transform"></a>**<font color="#7fb800">transform</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_point**</font>)
Translates a 3D point from local to global coordinates using the current transformation as frame of reference.
Translates a 3D point in place from local to global coordinates using the current transformation as frame of reference.
- **Parameters:**
- `in_point` (_[carla.Location](#carla.Location)_) - Location in the space to which the transformation will be applied.
- <a name="carla.Transform.transform_vector"></a>**<font color="#7fb800">transform_vector</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_vector**</font>)
Rotates a vector using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
- `in_point` (_[carla.Vector3D](#carla.Vector3D)_) - Location in the space to which the transformation will be applied.
- <a name="carla.Transform.transform_vector"></a>**<font color="#7fb800">transform_vector</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_point**</font>)
Rotates a vector in place using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
- **Parameters:**
- `in_vector` (_[carla.Vector3D](#carla.Vector3D)_) - Vector to which the transformation will be applied.
- `in_point` (_[carla.Vector3D](#carla.Vector3D)_) - Vector to which the transformation will be applied.

##### Getters
- <a name="carla.Transform.get_forward_vector"></a>**<font color="#7fb800">get_forward_vector</font>**(<font color="#00a6ed">**self**</font>)
Expand Down
17 changes: 13 additions & 4 deletions PythonAPI/docs/geom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -438,20 +438,29 @@
- def_name: transform
params:
- param_name: in_point
type: carla.Location
type: carla.Vector3D
doc: >
Location in the space to which the transformation will be applied.
doc: >
Translates a 3D point from local to global coordinates using the current transformation as frame of reference.
Translates a 3D point in place from local to global coordinates using the current transformation as frame of reference.
# --------------------------------------
- def_name: inverse_transform
params:
- param_name: in_point
type: carla.Vector3D
doc: >
Location in the space to which the inverse transformation will be applied.
doc: >
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.
# --------------------------------------
- def_name: transform_vector
params:
- param_name: in_vector
- param_name: in_point
type: carla.Vector3D
doc: >
Vector to which the transformation will be applied.
doc: >
Rotates a vector using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
Rotates a vector in place using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
# --------------------------------------
- def_name: get_forward_vector
return: carla.Vector3D
Expand Down

0 comments on commit f4c94e8

Please sign in to comment.