/// <summary> /// Constructs an object placement query definition requiring the object to /// be placed on a wall. /// </summary> /// <param name="halfDims">Required half size of the requested bounding volume</param> /// <param name="heightMin">Minimum height of the requested volume above the floor</param> /// <param name="heightMax">Maximum height of the requested volume above the floor</param> /// <param name="wallTypes">Bit mask of possible walls to consider, defined by WallTypeFlags</param> /// <param name="marginLeft">Required empty wall space to the left of the volume, as defined by facing the wall</param> /// <param name="marginRight">Required empty wall space to the right of the volume, as defined by facing the wall</param> /// <returns>Constructed object placement definition</returns> public static ObjectPlacementDefinition Create_OnWall( Vector3 halfDims, float heightMin, float heightMax, WallTypeFlags wallTypes = WallTypeFlags.External | WallTypeFlags.Normal, float marginLeft = 0.0f, float marginRight = 0.0f) { ObjectPlacementDefinition placement = new ObjectPlacementDefinition(); placement.Type = PlacementType.Place_OnWall; placement.HalfDims = halfDims; placement.PlacementParam_Float_0 = heightMin; placement.PlacementParam_Float_1 = heightMax; placement.PlacementParam_Float_2 = marginLeft; placement.PlacementParam_Float_3 = marginRight; placement.WallFlags = (int)wallTypes; return(placement); }
/// <summary> /// Constructs an object placement query definition requiring the object to /// be placed on a wall. /// </summary> /// <param name="halfDims">Required half size of the requested bounding volume</param> /// <param name="heightMin">Minimum height of the requested volume above the floor</param> /// <param name="heightMax">Maximum height of the requested volume above the floor</param> /// <param name="wallTypes">Bit mask of possible walls to consider, defined by WallTypeFlags</param> /// <param name="marginLeft">Required empty wall space to the left of the volume, as defined by facing the wall</param> /// <param name="marginRight">Required empty wall space to the right of the volume, as defined by facing the wall</param> /// <returns>Constructed object placement definition</returns> public static ObjectPlacementDefinition Create_OnWall( Vector3 halfDims, float heightMin, float heightMax, WallTypeFlags wallTypes = WallTypeFlags.External | WallTypeFlags.Normal, float marginLeft = 0.0f, float marginRight = 0.0f) { ObjectPlacementDefinition placement = new ObjectPlacementDefinition(); placement.Type = PlacementType.Place_OnWall; placement.HalfDims = halfDims; placement.PlacementParam_Float_0 = heightMin; placement.PlacementParam_Float_1 = heightMax; placement.PlacementParam_Float_2 = marginLeft; placement.PlacementParam_Float_3 = marginRight; placement.WallFlags = (int)wallTypes; return placement; }