Allolib  1.0
C++ Components For Interactive Multimedia
al::PickableBB Struct Reference

#include <C:/Users/Andres/source/repos/casm_viewer/external/tinc/external/allolib/include/al/ui/al_Pickable.hpp>

Inheritance diagram for al::PickableBB:
al::Pickable

Public Member Functions

 PickableBB (std::string name_="")
 
 PickableBB (Mesh &m)
 
void set (Mesh &m)
 initialize bounding box;
 
Hit intersect (Rayd r)
 override base methods
 
bool onEvent (PickEvent e, Hit h)
 override callback
 
void drawMesh (Graphics &g)
 
void drawBB (Graphics &g)
 
void setCenter (Vec3f &pos)
 set the pickable's center position
 
void setQuat (Quatf &q)
 set pickable's orientation maintaining same center position
 
double intersectBB (Rayd localRay)
 intersect ray with pickable BoundingBox
 
double intersectAABB (Rayd ray)
 intersect ray with pickable AxisAlignedBoundingBox
 
float intersectBoundingSphere (Rayd ray)
 intersect ray with bounding sphere
 
void updateAABB ()
 
virtual Hit intersect (Vec3d v)
 
virtual bool event (PickEvent e)
 do interaction on self and children, call onEvent callbacks
 
void clearSelection ()
 
bool intersects (Rayd &r)
 
bool intersectsChild (Rayd &r)
 
Hit intersectChildren (Rayd &r)
 
void addChild (Pickable &pickable)
 
void addChild (Pickable *p)
 
void pushMatrix (Graphics &g)
 apply pickable pose transforms
 
void popMatrix (Graphics &g)
 pop matrix.
 
void draw (Graphics &g, std::function< void(Pickable &p)> f=[](Pickable &p) {})
 
void foreach (std::function< void(Pickable &p)> pre, std::function< void(Pickable &p)> post=[](Pickable &) { })
 
Rayd transformRayLocal (const Rayd &ray)
 transform a ray in world space to local space
 
Vec3f transformVecWorld (const Vec3f &v, float w=1)
 transfrom a vector in local space to world space
 
Vec3f transformVecLocal (const Vec3f &v, float w=1)
 transfrom a vector in world space to local space
 

Public Attributes

Meshmesh {nullptr}
 
BoundingBox bb
 
BoundingBox aabb
 
Vec3f selectPos
 
Vec3f selectOffset
 
Quatf selectQuat
 
float selectDist
 
std::string name
 
ParameterBool hover {"hover", name}
 
ParameterBool selected {"selected", name}
 
ParameterPose pose {"pose", name}
 
ParameterVec3 scaleVec {"scaleVec", name}
 
Parameter scale {"scale", name, 1.0f, "", 0.0f, 10.0f}
 
ParameterBundle bundle {"pickable"}
 
Pickableparent = nullptr
 
std::vector< Pickable * > children
 
bool testChildren = true
 
bool containChildren = false
 
bool containedChild = false
 
int depth = 0
 
Pose pose0
 
Pose prevPose
 
Vec3f scale0
 
Vec3f prevScale
 

Detailed Description

Bounding Box PickableMesh

Definition at line 134 of file al_Pickable.hpp.

Member Function Documentation

◆ updateAABB()

void al::PickableBB::updateAABB ( )

calculate Axis aligned bounding box from mesh bounding box and current transforms


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