Unigine::WorldSector Class
Header: | #include <UnigineWorlds.h> |
Inherits: | Node |
Creates a box-shaped sector. When the player is inside of it, everything outside its volume is culled. If a surface is even partly outside the sector, it is culled as well.
See Also#
A UnigineScript API sample <UnigineSDK>/data/samples/worlds/sector_00
WorldSector Class
Members
static WorldSectorPtr create ( const Math::vec3 & dimensions ) #
Constructor. Creates a new world sector with given dimensions.Arguments
- const Math::vec3 & dimensions - Dimensions of the new world sector. If negative values are provided, 0 will be used instead of them.
Ptr<Node> getNode ( int id ) #
Returns a specified node contained in the world sector.Arguments
- int id - Number of the node in range from 0 to the total number of nodes.
Return value
Node pointer.int getNumNodes ( ) #
Returns the number of nodes contained in the world sector.Return value
Number of nodes.int getNumWorldPortals ( ) #
Returns the number of world portals adjacent to the world sector.Return value
Number of portals.void setSize ( const Math::vec3 & size ) #
Updates the current dimensions of the world sector. The minimum value is vec3(0,0,0).Arguments
- const Math::vec3 & size - Dimensions of the world sector.
Math::vec3 getSize ( ) #
Returns the current dimensions of the world sector. The minimum value is vec3(0,0,0).Return value
Current dimensions.Ptr<WorldPortal> getWorldPortal ( int id ) #
Returns a specified world portal adjacent to the world sector.Arguments
- int id - Number of the portal in range from 0 to the total number of portals.
Return value
Specified portal.static int type ( ) #
Returns the type of the node.Return value
World type identifier.Last update:
2019-12-25
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)