Class VRObject

  • Direct Known Subclasses:
    Client, Terrain, VRFile

    @Node
    public class VRObject
    extends Entity
    Basic VR Object encapsulates minimal spatial and other properties.
    Author:
    joe
    • Constructor Detail

      • VRObject

        public VRObject​(World world)
      • VRObject

        public VRObject​(Long id,
                        VRObject... vrObjects)
      • VRObject

        public VRObject​(Long id,
                        double x,
                        double y,
                        double z,
                        VRObject... vrObjects)
      • VRObject

        public VRObject​(double x,
                        double y,
                        double z)
      • VRObject

        public VRObject​(World world,
                        double x,
                        double y,
                        double z)
      • VRObject

        public VRObject()
    • Method Detail

      • setWorld

        public void setWorld​(World world)
      • addChildren

        public void addChildren​(VRObject... vrObjects)
      • isPermanent

        public boolean isPermanent()
      • addListener

        public void addListener​(VRObject obj)
      • removeListener

        public void removeListener​(VRObject obj)
      • notifyListeners

        public void notifyListeners​(VREvent event)
      • processEvent

        public void processEvent​(VREvent event)
        This implementation does nothing
        Parameters:
        event - Whatever has changed
      • isActive

        public boolean isActive()
      • isTemporary

        public boolean isTemporary()
      • getWorldId

        public Long getWorldId()
      • getWorld

        public World getWorld()
      • getPosition

        public Point getPosition()
        Position in 3D space, used for spatial operations.
      • getRotation

        public Rotation getRotation()
      • getScale

        public Point getScale()
      • getPermanent

        public Boolean getPermanent()
        Permanent objects are always present (e.g. sky)
      • getTemporary

        public Boolean getTemporary()
        Temporary objects will be deleted from the database along with their owner
      • getActive

        public Boolean getActive()
        Whether an object is active (can send events). E.g. online users, robots.
      • getMesh

        public String getMesh()
        URL of the file containing the mesh.
      • getScript

        public String getScript()
        Script that client runs. To prevent cross-site scripting, this is a read-only property.
      • getAnimation

        public Animation getAnimation()
        Currently active animation
      • getProperties

        public Map<String,​Object> getProperties()
        Custom object properties
      • setChildren

        public void setChildren​(List<VRObject> children)
      • setWorldId

        public void setWorldId​(Long worldId)
      • setPosition

        public void setPosition​(Point position)
        Position in 3D space, used for spatial operations.
      • setRotation

        public void setRotation​(Rotation rotation)
      • setScale

        public void setScale​(Point scale)
      • setPermanent

        public void setPermanent​(Boolean permanent)
        Permanent objects are always present (e.g. sky)
      • setTemporary

        public void setTemporary​(Boolean temporary)
        Temporary objects will be deleted from the database along with their owner
      • setActive

        public void setActive​(Boolean active)
        Whether an object is active (can send events). E.g. online users, robots.
      • setMesh

        public void setMesh​(String mesh)
        URL of the file containing the mesh.
      • setScript

        public void setScript​(String script)
        Script that client runs. To prevent cross-site scripting, this is a read-only property.
      • setAnimation

        public void setAnimation​(Animation animation)
        Currently active animation
      • setProperties

        public void setProperties​(Map<String,​Object> properties)
        Custom object properties
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Entity