Blender V5.3
ObjectMatrices Struct Reference

#include <draw_shader_shared.hh>

Public Member Functions

ObjectMatrices
void sync (const Object &object)
void sync (const float4x4 &model_matrix)
Transform Point

Space conversion helpers for points (coordinates).

float3 point_object_to_world (float3 lP) const
float3 point_world_to_object (float3 P) const
float3 point_object_to_view (ViewMatrices view, float3 lP) const
float3 point_view_to_object (ViewMatrices view, float3 vP) const
float4 point_object_to_homogenous (ViewMatrices view, float3 lP) const
float3 point_object_to_ndc (ViewMatrices view, float3 lP) const

Public Attributes

float4x4 model
float4x4 model_inverse

Detailed Description

Definition at line 350 of file draw_shader_shared.hh.

Member Function Documentation

◆ point_object_to_homogenous()

float4 ObjectMatrices::point_object_to_homogenous ( ViewMatrices view,
float3 lP ) const
inline

Definition at line 438 of file draw_shader_shared.hh.

References model, ViewMatrices::viewmat, and ViewMatrices::winmat.

Referenced by point_object_to_ndc().

◆ point_object_to_ndc()

float3 ObjectMatrices::point_object_to_ndc ( ViewMatrices view,
float3 lP ) const
inline

◆ point_object_to_view()

float3 ObjectMatrices::point_object_to_view ( ViewMatrices view,
float3 lP ) const
inline

Definition at line 428 of file draw_shader_shared.hh.

References model, and ViewMatrices::viewmat.

◆ point_object_to_world()

◆ point_view_to_object()

float3 ObjectMatrices::point_view_to_object ( ViewMatrices view,
float3 vP ) const
inline

Definition at line 433 of file draw_shader_shared.hh.

References model_inverse, and ViewMatrices::viewinv.

Referenced by workbench::volume::fragment_function().

◆ point_world_to_object()

◆ sync() [1/2]

void ObjectMatrices::sync ( const float4x4 & model_matrix)
inline

Definition at line 45 of file draw_resource.hh.

References blender::math::invert(), model, and model_inverse.

◆ sync() [2/2]

void ObjectMatrices::sync ( const Object & object)
inline

Definition at line 39 of file draw_resource.hh.

References model, and model_inverse.

Member Data Documentation

◆ model

◆ model_inverse


The documentation for this struct was generated from the following files: