-
- All Known Implementing Classes:
DummyClientWorld
public interface GraphicWorldA world is a specific part of the game, all entities in a world will never have interactions with entities from other worlds. A world manage the physic properties(gravity, collisions...), a ClientWorld manage also the graphic properties(camera, particles...).- Author:
- Grégory Van den Borre
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Linecreate3DLine()Create a simple line.BillboardSetcreateBillboardSet(Material material)Create a billboard set.CameracreateCamera(String name)Create a new camera with default behavior(freefly).DirectionalLightcreateDirectionalLight(String name, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)Create a light of type directional light.ElectricArccreateElectricArc(be.yildizgames.common.geometry.Point3D origin, be.yildizgames.common.geometry.Point3D end, float width)Create an electric arc effect.ExplosioncreateExplosion()Create an explosion effect.GroundQuerycreateGroundQuery(RayProvider provider)LensFlarecreateLensFlare(LensFlare.LensFlareMaterial mat, be.yildizgames.common.geometry.Point3D position)Create a new lens flare.GraphicObjectcreateMovableDoodad(be.yildizgames.common.shape.Box box, Material material)Create a movable graphic box, it has no Id, is not selectable and will not be affected in any way by physics.GraphicObjectcreateMovableDoodad(be.yildizgames.common.shape.Plane plane, Material material)Create a movable graphic plane, it has no Id, is not selectable and will not be affected in any way by physics.GraphicObjectcreateMovableDoodad(be.yildizgames.common.shape.Sphere sphere, Material material)Create a movable graphic sphere, it has no Id, is not selectable and will not be affected in any way by physics.GraphicObjectcreateMovableDoodad(GraphicMesh mesh)Create a movable graphic object, it has no Id, is not selectable and will not be affected in any way by physics.GraphicObjectcreateMovableObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Box box, Material material, be.yildizgames.common.geometry.Point3D position)Create a movable graphic physic box, it has a given Id, is selectable and will not be affected in any way by physics dynamic, but is collidable.GraphicObjectcreateMovableObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Plane plane, Material material, be.yildizgames.common.geometry.Point3D position)GraphicObjectcreateMovableObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Sphere sphere, Material material, be.yildizgames.common.geometry.Point3D position)Create a movable graphic physic sphere, it has a given Id, is selectable and will not be affected in any way by physics dynamic, but is collidable.GraphicObjectcreateMovableObject(be.yildizgames.common.model.EntityId id, GraphicMesh shape, be.yildizgames.common.geometry.Point3D position)Create a movable graphic object, it has a given Id, is selectable and will not be affected in any way by physics dynamic, and is not collidable.default MovableTextcreateMovableText(String text, Font font)MovableTextcreateMovableText(String name, String text, Font font)Create a HUD text that will be displayed next an entity.OceancreateOcean()Create an ocean environment.ParticleSystemcreateParticleSystem()Create a particle system.PointLightcreatePointLight(String name, be.yildizgames.common.geometry.Point3D position)Create a new light of type point.QuerycreateQuery(RayProvider provider)SkycreateSky()Create a sky environment.SpotLightcreateSpotLight(String name, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)Create a light of type spot light.GraphicObjectcreateStaticDoodad(be.yildizgames.common.shape.Box box, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)Create a static graphic box, it has no Id, is not selectable, cannot move, and will not be affected in any way by physics.GraphicObjectcreateStaticDoodad(be.yildizgames.common.shape.Plane plane, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)Create a static graphic plane, it has no Id, is not selectable, cannot move, and will not be affected in any way by physics.GraphicObjectcreateStaticDoodad(be.yildizgames.common.shape.Sphere sphere, Material material, be.yildizgames.common.geometry.Point3D position)Create a static graphic sphere, it has no Id, is not selectable, cannot move, the direction is the base direction and will not be affected in any way by physics.GraphicObjectcreateStaticDoodad(be.yildizgames.common.shape.Sphere sphere, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)Create a static graphic sphere, it has no Id, is not selectable, cannot move, and will not be affected in any way by physics.default GraphicObjectcreateStaticDoodad(GraphicMesh mesh, be.yildizgames.common.geometry.Point3D position)Create a static graphic object, it has no Id, is not selectable, cannot move, and will not be affected in any way by physics.GraphicObjectcreateStaticDoodad(GraphicMesh mesh, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)Create a static graphic object, it has no Id, is not selectable, cannot move, and will not be affected in any way by physics.GraphicObjectcreateStaticObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Box box, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)Create a static graphic physic box, it has a given Id, is selectable, cannot move, and will not be affected in any way by physics dynamic, but is collidable.GraphicObjectcreateStaticObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Plane plane, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)Create a static graphic physic plane, it has a given Id, is selectable, cannot move, and will not be affected in any way by physics dynamic, but is collidable.GraphicObjectcreateStaticObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Sphere sphere, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)Create a static graphic physic sphere, it has a given Id, is selectable, cannot move, and will not be affected in any way by physics dynamic, but is collidable.GraphicObjectcreateStaticObject(be.yildizgames.common.model.EntityId id, GraphicMesh shape, be.yildizgames.common.geometry.Point3D position)Create a static graphic physic object, the physic object is a primitive instead of a mesh, to improve performances, it has a given Id, is selectable, cannot move, and will not be affected in any way by physics .GraphicObjectcreateStaticObject(be.yildizgames.common.model.EntityId id, GraphicMesh mesh, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)voiddeleteLight(Light light)Delete a light.voiddeleteLight(String name)Unregister and delete a light.CameragetCamera(String name)Retrieve a Camera from its unique name.CameragetDefaultCamera()LightgetLight(String name)Retrieve a Light from its unique name.StringgetName()booleanisDebug()voidserializeShapeFromMesh(String mesh, String file, String name)Create a physic serialized shape from a graphic mesh and save it in a file.voidsetAmbientLight(be.yildizgames.module.color.Color color)Set the scene ambient light.voidsetDebugMode()Activate the debug mode on this world.voidsetSkybox(Skybox sky)Build a sky box.
-
-
-
Method Detail
-
createQuery
Query createQuery(RayProvider provider)
-
createGroundQuery
GroundQuery createGroundQuery(RayProvider provider)
-
createMovableDoodad
GraphicObject createMovableDoodad(be.yildizgames.common.shape.Box box, Material material)
Create a movable graphic box, it has no Id, is not selectable and will not be affected in any way by physics. It is usually used to represent not selectable object like small animals, unreachable background objects...- Parameters:
box- Box to use as graphic resource.material- The material to set.- Returns:
- The built object.
-
createMovableDoodad
GraphicObject createMovableDoodad(be.yildizgames.common.shape.Sphere sphere, Material material)
Create a movable graphic sphere, it has no Id, is not selectable and will not be affected in any way by physics. It is usually used to represent not selectable object like small animals, unreachable background objects...- Parameters:
sphere- Sphere to use as graphic resource.material- The material to set.- Returns:
- The built object.
-
createMovableDoodad
GraphicObject createMovableDoodad(be.yildizgames.common.shape.Plane plane, Material material)
Create a movable graphic plane, it has no Id, is not selectable and will not be affected in any way by physics. It is usually used to represent not selectable object like small animals, unreachable background objects...- Parameters:
plane- Plane to use as graphic resource.material- The material to set.- Returns:
- The built object.
-
createMovableDoodad
GraphicObject createMovableDoodad(GraphicMesh mesh)
Create a movable graphic object, it has no Id, is not selectable and will not be affected in any way by physics. It is usually used to represent not selectable object like small animals, unreachable background objects...- Parameters:
mesh- Mesh to use as graphic resource.- Returns:
- The built object.
-
createStaticDoodad
GraphicObject createStaticDoodad(be.yildizgames.common.shape.Box box, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
Create a static graphic box, it has no Id, is not selectable, cannot move, and will not be affected in any way by physics. It is usually used to represent unselectable object like small vegetation, small rocks...- Parameters:
box- Box to use as graphic resource.material- The material to set.position- Object immutable position, InvalidParamException is thrown in case of null parameter.direction- Object immutable direction, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createStaticDoodad
GraphicObject createStaticDoodad(be.yildizgames.common.shape.Plane plane, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
Create a static graphic plane, it has no Id, is not selectable, cannot move, and will not be affected in any way by physics. It is usually used to represent unselectable object like small vegetation, small rocks...- Parameters:
plane- Plane to use as graphic resource.material- The material to set.position- Object immutable position, InvalidParamException is thrown in case of null parameter.direction- Object immutable direction, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createStaticDoodad
GraphicObject createStaticDoodad(be.yildizgames.common.shape.Sphere sphere, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
Create a static graphic sphere, it has no Id, is not selectable, cannot move, and will not be affected in any way by physics. It is usually used to represent unselectable object like small vegetation, small rocks...- Parameters:
sphere- Sphere to use as graphic resource.material- The material to set.position- Object immutable position, InvalidParamException is thrown in case of null parameter.direction- Object immutable direction, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createStaticDoodad
GraphicObject createStaticDoodad(be.yildizgames.common.shape.Sphere sphere, Material material, be.yildizgames.common.geometry.Point3D position)
Create a static graphic sphere, it has no Id, is not selectable, cannot move, the direction is the base direction and will not be affected in any way by physics. It is usually used to represent unselectable object like small vegetation, small rocks...- Parameters:
sphere- Sphere to use as graphic resource.material- The material to set.position- Object immutable position, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createStaticDoodad
default GraphicObject createStaticDoodad(GraphicMesh mesh, be.yildizgames.common.geometry.Point3D position)
Create a static graphic object, it has no Id, is not selectable, cannot move, and will not be affected in any way by physics. It is usually used to represent unselectable object like small vegetation, small rocks...- Parameters:
mesh- Mesh to use as graphic resource.position- Object immutable position, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createStaticDoodad
GraphicObject createStaticDoodad(GraphicMesh mesh, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
Create a static graphic object, it has no Id, is not selectable, cannot move, and will not be affected in any way by physics. It is usually used to represent unselectable object like small vegetation, small rocks...- Parameters:
mesh- Mesh to use as graphic resource.position- Object immutable position, InvalidParamException is thrown in case of null parameter.direction- Object immutable direction, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createStaticObject
GraphicObject createStaticObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Box box, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
Create a static graphic physic box, it has a given Id, is selectable, cannot move, and will not be affected in any way by physics dynamic, but is collidable. It is usually used to represent selectable or collidable object like buildings, trees...- Parameters:
id- id to retrieve when object is selected, has collisions...box- Box to use as graphic and physic resource.material- The material to set.position- Object immutable position, InvalidParamException is thrown in case of null parameter.direction- Object immutable direction, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createStaticObject
GraphicObject createStaticObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Sphere sphere, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
Create a static graphic physic sphere, it has a given Id, is selectable, cannot move, and will not be affected in any way by physics dynamic, but is collidable. It is usually used to represent selectable or collidable object like buildings, trees...- Parameters:
id- id to retrieve when object is selected, has collisions...sphere- Sphere to use as graphic and physic resource.material- The material to set.position- Object immutable position, InvalidParamException is thrown in case of null parameter.direction- Object immutable direction, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createStaticObject
GraphicObject createStaticObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Plane plane, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
Create a static graphic physic plane, it has a given Id, is selectable, cannot move, and will not be affected in any way by physics dynamic, but is collidable. It is usually used to represent selectable or collidable object like buildings, trees...- Parameters:
id- id to retrieve when object is selected, has collisions...plane- Plane to use as graphic resource.material- The material to set.position- Object immutable position, InvalidParamException is thrown in case of null parameter.direction- Object immutable direction, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createStaticObject
GraphicObject createStaticObject(be.yildizgames.common.model.EntityId id, GraphicMesh shape, be.yildizgames.common.geometry.Point3D position)
Create a static graphic physic object, the physic object is a primitive instead of a mesh, to improve performances, it has a given Id, is selectable, cannot move, and will not be affected in any way by physics . It is usually used to represent selectable object like buildings, trees...- Parameters:
id- id to retrieve when object is selected, has collisions...shape- Shape to use as graphic and physic resource, physic shape is a primitive instead of a mesh to improve performance.position- Object immutable position, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createMovableObject
GraphicObject createMovableObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Box box, Material material, be.yildizgames.common.geometry.Point3D position)
Create a movable graphic physic box, it has a given Id, is selectable and will not be affected in any way by physics dynamic, but is collidable. It is usually used to represent playable or movable object like characters, vehicles...- Parameters:
id- id to retrieve when object is selected, has collisions...box- Box to use as graphic and physic resource.material- The material to set.position- Initial object position.- Returns:
- The built object.
-
createMovableObject
GraphicObject createMovableObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Plane plane, Material material, be.yildizgames.common.geometry.Point3D position)
-
createMovableObject
GraphicObject createMovableObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Sphere sphere, Material material, be.yildizgames.common.geometry.Point3D position)
Create a movable graphic physic sphere, it has a given Id, is selectable and will not be affected in any way by physics dynamic, but is collidable. It is usually used to represent playable or movable object like characters, vehicles...- Parameters:
id- id to retrieve when object is selected, has collisions...sphere- Sphere to use as graphic and physic resource.material- The material to set.position- Initial object position.- Returns:
- The built object.
-
createMovableObject
GraphicObject createMovableObject(be.yildizgames.common.model.EntityId id, GraphicMesh shape, be.yildizgames.common.geometry.Point3D position)
Create a movable graphic object, it has a given Id, is selectable and will not be affected in any way by physics dynamic, and is not collidable. It is usually used to represent playable or movable object like characters, vehicles...- Parameters:
id- id to retrieve when object is selected.shape- A container for a graphic mesh.position- Initial object position.- Returns:
- The built object.
-
createCamera
Camera createCamera(String name)
Create a new camera with default behavior(freefly).- Parameters:
name- Camera name, must be unique.- Returns:
- The newly built camera.
-
setSkybox
void setSkybox(Skybox sky)
Build a sky box.- Parameters:
sky- The material to use.
-
setDebugMode
void setDebugMode()
Activate the debug mode on this world.
-
setAmbientLight
void setAmbientLight(be.yildizgames.module.color.Color color)
Set the scene ambient light.- Parameters:
color- Light color.
-
createPointLight
PointLight createPointLight(String name, be.yildizgames.common.geometry.Point3D position)
Create a new light of type point.- Parameters:
name- Name of the light, must be unique.position- Light position.- Returns:
- The newly built light.
-
createElectricArc
ElectricArc createElectricArc(be.yildizgames.common.geometry.Point3D origin, be.yildizgames.common.geometry.Point3D end, float width)
Create an electric arc effect.- Parameters:
origin- Electric arc origin position.end- Electric arc end position.width- Elements width.- Returns:
- The created ElectricArc.
-
createExplosion
Explosion createExplosion()
Create an explosion effect.- Returns:
- The created Explosion.
-
createParticleSystem
ParticleSystem createParticleSystem()
Create a particle system.- Returns:
- The created ParticleSystem.
-
createSky
Sky createSky()
Create a sky environment.- Returns:
- The created Sky.
-
createOcean
Ocean createOcean()
Create an ocean environment.- Returns:
- The created Ocean.
-
getDefaultCamera
Camera getDefaultCamera()
- Returns:
- The camera built at same time as this world.
-
create3DLine
Line create3DLine()
Create a simple line.- Returns:
- The created Line.
-
createLensFlare
LensFlare createLensFlare(LensFlare.LensFlareMaterial mat, be.yildizgames.common.geometry.Point3D position)
Create a new lens flare.- Parameters:
mat- Lensflare materials.position- Lens flare origin position.- Returns:
- The created LensFlare.
-
createSpotLight
SpotLight createSpotLight(String name, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
Create a light of type spot light.- Parameters:
name- Light name, must be unique.position- Spot position.direction- Spot direction.- Returns:
- The created light.
-
createDirectionalLight
DirectionalLight createDirectionalLight(String name, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
Create a light of type directional light.- Parameters:
name- Light name, must be unique.position- Light position.direction- Light direction.- Returns:
- The created light.
-
serializeShapeFromMesh
void serializeShapeFromMesh(String mesh, String file, String name)
Create a physic serialized shape from a graphic mesh and save it in a file.- Parameters:
mesh- Mesh to use to get the vertices data.file- File to save.name- Associated name.
-
isDebug
boolean isDebug()
- Returns:
trueif the world is in debug mode.
-
deleteLight
void deleteLight(Light light)
Delete a light.- Parameters:
light- Light to delete.
-
getCamera
Camera getCamera(String name)
Retrieve a Camera from its unique name.- Parameters:
name- Unique camera name.- Returns:
- Found camera.
-
getLight
Light getLight(String name)
Retrieve a Light from its unique name.- Parameters:
name- Unique light name.- Returns:
- Found light.
-
deleteLight
void deleteLight(String name)
Unregister and delete a light.- Parameters:
name- Name of the light to delete.
-
createMovableText
MovableText createMovableText(String name, String text, Font font)
Create a HUD text that will be displayed next an entity.- Parameters:
name- Object unique name.text- Text to display.font- Font to use.- Returns:
- The created movable text.
-
createMovableText
default MovableText createMovableText(String text, Font font)
-
createBillboardSet
BillboardSet createBillboardSet(Material material)
Create a billboard set.- Parameters:
material- Material to use.- Returns:
- The created billboard set.
-
createStaticObject
GraphicObject createStaticObject(be.yildizgames.common.model.EntityId id, GraphicMesh mesh, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
-
getName
String getName()
-
-