本文整理了Java中com.jme3.scene.Mesh.createCollisionData()
方法的一些代码示例,展示了Mesh.createCollisionData()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mesh.createCollisionData()
方法的具体详情如下:
包路径:com.jme3.scene.Mesh
类名称:Mesh
方法名:createCollisionData
[英]Generates a collision tree for the mesh. Called automatically by #collideWith(com.jme3.collision.Collidable,com.jme3.math.Matrix4f,com.jme3.bounding.BoundingVolume,com.jme3.collision.CollisionResults).
[中]为网格生成碰撞树。由#collide with(com.jme3.collization.Collidable、com.jme3.math.Matrix4f、com.jme3.bounding.BoundingVolume、com.jme3.collization.CollisionResults)自动调用。
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Handles collision detection, internal use only.
* User code should only use collideWith() on scene
* graph elements such as {@link Spatial}s.
*/
public int collideWith(Collidable other,
Matrix4f worldMatrix,
BoundingVolume worldBound,
CollisionResults results){
switch (mode) {
case Points:
case Lines:
case LineStrip:
case LineLoop:
/*
* Collisions can be detected only with triangles,
* and there are no triangles in this mesh.
*/
return 0;
}
if (getVertexCount() == 0) {
return 0;
}
if (collisionTree == null){
createCollisionData();
}
return collisionTree.collideWith(other, worldMatrix, worldBound, results);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
terrainBlock.createCollisionData();
代码示例来源:origin: info.projectkyoto/mms-engine
/**
* Handles collision detection, internal use only.
* User code should only use collideWith() on scene
* graph elements such as {@link Spatial}s.
*/
public int collideWith(Collidable other,
Matrix4f worldMatrix,
BoundingVolume worldBound,
CollisionResults results){
if (getVertexCount() == 0) {
return 0;
}
if (collisionTree == null){
createCollisionData();
}
return collisionTree.collideWith(other, worldMatrix, worldBound, results);
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* Handles collision detection, internal use only.
* User code should only use collideWith() on scene
* graph elements such as {@link Spatial}s.
*/
public int collideWith(Collidable other,
Matrix4f worldMatrix,
BoundingVolume worldBound,
CollisionResults results){
switch (mode) {
case Points:
case Lines:
case LineStrip:
case LineLoop:
/*
* Collisions can be detected only with triangles,
* and there are no triangles in this mesh.
*/
return 0;
}
if (getVertexCount() == 0) {
return 0;
}
if (collisionTree == null){
createCollisionData();
}
return collisionTree.collideWith(other, worldMatrix, worldBound, results);
}
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-terrain
terrainBlock.createCollisionData();
内容来源于网络,如有侵权,请联系作者删除!