|
Allolib
1.0
C++ Components For Interactive Multimedia
|
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 | |
| Mesh * | mesh {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"} |
| Pickable * | parent = 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 |
Bounding Box PickableMesh
Definition at line 134 of file al_Pickable.hpp.
| void al::PickableBB::updateAABB | ( | ) |
calculate Axis aligned bounding box from mesh bounding box and current transforms