Search in sources :

Example 11 with LevelEditorEntityBoundingVolume

use of net.drewke.tdme.tools.shared.model.LevelEditorEntityBoundingVolume in project tdme by andreasdr.

the class EntityBoundingVolumeView method applyBoundingVolumeNone.

/**
	 * On bounding volume none apply
	 * @param entity
	 * @param bounding volume index
	 */
public void applyBoundingVolumeNone(LevelEditorEntity entity, int idx) {
    // exit if no entity
    if (entity == null)
        return;
    //
    LevelEditorEntityBoundingVolume entityBoundingVolume = entity.getBoundingVolumeAt(idx);
    entityBoundingVolume.setupNone();
    updateModelBoundingVolume(entity, idx);
}
Also used : LevelEditorEntityBoundingVolume(net.drewke.tdme.tools.shared.model.LevelEditorEntityBoundingVolume)

Example 12 with LevelEditorEntityBoundingVolume

use of net.drewke.tdme.tools.shared.model.LevelEditorEntityBoundingVolume in project tdme by andreasdr.

the class EntityBoundingVolumeView method applyBoundingVolumeSphere.

/**
	 * On bounding volume sphere apply
	 * @param entity
	 * @param bounding volume index
	 * @param sphere center
	 * @param radius
	 */
public void applyBoundingVolumeSphere(LevelEditorEntity entity, int idx, Vector3 center, float radius) {
    // exit if no entity
    if (entity == null)
        return;
    LevelEditorEntityBoundingVolume entityBoundingVolume = entity.getBoundingVolumeAt(idx);
    entityBoundingVolume.setupSphere(center, radius);
    updateModelBoundingVolume(entity, idx);
}
Also used : LevelEditorEntityBoundingVolume(net.drewke.tdme.tools.shared.model.LevelEditorEntityBoundingVolume)

Aggregations

LevelEditorEntityBoundingVolume (net.drewke.tdme.tools.shared.model.LevelEditorEntityBoundingVolume)12 BoundingBox (net.drewke.tdme.engine.primitives.BoundingBox)3 Vector3 (net.drewke.tdme.math.Vector3)3 IOException (java.io.IOException)2 Entity (net.drewke.tdme.engine.Entity)2 Object3D (net.drewke.tdme.engine.Object3D)2 BoundingVolume (net.drewke.tdme.engine.primitives.BoundingVolume)2 Capsule (net.drewke.tdme.engine.primitives.Capsule)2 ConvexMesh (net.drewke.tdme.engine.primitives.ConvexMesh)2 OrientedBoundingBox (net.drewke.tdme.engine.primitives.OrientedBoundingBox)2 Sphere (net.drewke.tdme.engine.primitives.Sphere)2 LevelEditorEntity (net.drewke.tdme.tools.shared.model.LevelEditorEntity)2 File (java.io.File)1 Camera (net.drewke.tdme.engine.Camera)1 Light (net.drewke.tdme.engine.Light)1 Transformations (net.drewke.tdme.engine.Transformations)1 FacesEntity (net.drewke.tdme.engine.model.FacesEntity)1 Model (net.drewke.tdme.engine.model.Model)1 RigidBody (net.drewke.tdme.engine.physics.RigidBody)1 Triangle (net.drewke.tdme.engine.primitives.Triangle)1