Fx2D
A C++20 2D rigid-body physics engine
Loading...
Searching...
No Matches
FxVisualShape Struct Reference

#include <Entity.h>

Inheritance diagram for FxVisualShape:
Collaboration diagram for FxVisualShape:

Public Member Functions

 FxVisualShape (const FxShape &base)
void set_fillColor (const FxVec4ui8 &color)
void set_outlineColor (const FxVec4ui8 &color)
void set_outlineThickness (const float &thickness)
void set_fillTexture (const std::string &filePath)
const FxVec4ui8 & fillColor () const
const std::string & fillTexture () const
const FxVec4ui8 & outlineColor () const
float outlineThickness () const
 FxShape ()
 FxShape (float radius)
 FxShape (float length, float radius)
 FxShape (const FxVec2f &a, const FxVec2f &b)
 FxShape (const FxVec2fArray &points, ChainTag)
 FxShape (const FxVec2fArray &vertices, float skin_radius=0.0f)
 FxShape (const FxVec2f &size, float skin_radius=0.0f)
Public Member Functions inherited from FxShape
 FxShape ()
 FxShape (float radius)
 FxShape (float length, float radius)
 FxShape (const FxVec2f &a, const FxVec2f &b)
 FxShape (const FxVec2fArray &points, ChainTag)
 FxShape (const FxVec2fArray &vertices, float skin_radius=0.0f)
 FxShape (const FxVec2f &size, float skin_radius=0.0f)
FxShapeType shape_type () const
float radius () const
float skin_radius () const
const FxVec2fArray & vertices () const
FxVec2fArray __vertices () const
FxVec2f centroid () const
bool is_circle () const
bool is_capsule () const
bool is_polygon () const
bool is_chain () const
std::size_t segment_count () const
FxShape segment (std::size_t i) const
bool is_edge () const
bool contains (const FxVec2f &p) const
float area () const
float calc_inertia (float mass) const
void set_offset_pose (const FxVec3f &o_pose)
FxVec3f offset_pose () const
FxArray< float > set_world_pose (const FxVec3f &world_pose)
void set_world_pose (const FxVec3f &world_pose, FxArray< float > &out_aabb)
FxVec3f world_pose () const
void set_position (const FxVec2f &pos)
void set_rotation (float theta)
void move (const FxVec2f &delta)
void rotate (float delta_theta)
std::pair< std::size_t, float > min_projection (const FxVec2f &axis, const FxVec2f &origin) const
FxVec2f get_closest_vertex (const FxVec2f &point) const

Additional Inherited Members

Static Public Member Functions inherited from FxShape
static float polygon_area (const FxVec2fArray &verts)
static FxShape make_chain (const FxVec2fArray &points)
Static Protected Member Functions inherited from FxShape
static float calc_radius (const FxVec2fArray &verts)
static bool is_convex (const FxVec2fArray &verts)
Protected Attributes inherited from FxShape
FxShapeType m_shape_type
float m_radius
float m_skin_radius = 0.0f
FxVec2fArray m_vertices
FxVec3f m_offset_pose {0.0f, 0.0f, 0.0f}
FxVec3f m_world_pose {0.0f, 0.0f, 0.0f}
FxVec2f m_centroid {0.0f, 0.0f}
FxVec2fArray m_world_vertices

Detailed Description

Definition at line 19 of file Entity.h.

Constructor & Destructor Documentation

◆ FxVisualShape()

FxVisualShape::FxVisualShape ( const FxShape & base)
inline

Definition at line 29 of file Entity.h.

Member Function Documentation

◆ fillColor()

const FxVec4ui8 & FxVisualShape::fillColor ( ) const
inline

Definition at line 39 of file Entity.h.

◆ fillTexture()

const std::string & FxVisualShape::fillTexture ( ) const
inline

Definition at line 40 of file Entity.h.

◆ FxShape() [1/7]

FxShape::FxShape ( )
inline

Definition at line 86 of file Geometry.h.

◆ FxShape() [2/7]

FxShape::FxShape ( const FxVec2f & a,
const FxVec2f & b )
inline

Definition at line 114 of file Geometry.h.

◆ FxShape() [3/7]

FxShape::FxShape ( const FxVec2f & size,
float skin_radius = 0.0f )
inline

Definition at line 163 of file Geometry.h.

◆ FxShape() [4/7]

FxShape::FxShape ( const FxVec2fArray & points,
ChainTag  )
inline

Definition at line 128 of file Geometry.h.

◆ FxShape() [5/7]

FxShape::FxShape ( const FxVec2fArray & vertices,
float skin_radius = 0.0f )
inline

Definition at line 143 of file Geometry.h.

◆ FxShape() [6/7]

FxShape::FxShape ( float length,
float radius )
inline

Definition at line 98 of file Geometry.h.

◆ FxShape() [7/7]

FxShape::FxShape ( float radius)
inline

Definition at line 89 of file Geometry.h.

◆ outlineColor()

const FxVec4ui8 & FxVisualShape::outlineColor ( ) const
inline

Definition at line 41 of file Entity.h.

◆ outlineThickness()

float FxVisualShape::outlineThickness ( ) const
inline

Definition at line 42 of file Entity.h.

◆ set_fillColor()

void FxVisualShape::set_fillColor ( const FxVec4ui8 & color)
inline

Definition at line 31 of file Entity.h.

◆ set_fillTexture()

void FxVisualShape::set_fillTexture ( const std::string & filePath)
inline

Definition at line 37 of file Entity.h.

◆ set_outlineColor()

void FxVisualShape::set_outlineColor ( const FxVec4ui8 & color)
inline

Definition at line 35 of file Entity.h.

◆ set_outlineThickness()

void FxVisualShape::set_outlineThickness ( const float & thickness)
inline

Definition at line 36 of file Entity.h.


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