Package com.ngt.jopenmetaverse.shared.protocol.primitives

Examples of com.ngt.jopenmetaverse.shared.protocol.primitives.Primitive


   
    private void MeshPrim(RenderPrimitive rprim) throws Exception
    {
      primMesher.MeshPrim(rprim, true, DetailLevel.High, DetailLevel.High, DetailLevel.Highest);
     
      Primitive prim = rprim.getBasePrim();
      for(int i =0;  i < rprim.Faces.size(); i ++)
    {
      TextureEntryFace tef = prim.Textures.GetFace(i);
      System.out.println(String.format("\t\tFace Index: %d, Texture ID: %s", i, tef.getTextureID()));
      textureManager.requestDownloadTexture(new TextureLoadItem((FaceData)rprim.Faces.get(i).UserData,
View Full Code Here


      final DetailLevel SculptRenderDetail, final DetailLevel MeshRenderDetail) throws Exception
  {
    if (rprim.Meshing) return;

    rprim.Meshing = true;
    Primitive prim = rprim.getBasePrim();

    // Regular prim
    if (prim.Sculpt == null || prim.Sculpt.SculptTexture.equals(UUID.Zero))
    {
      System.out.println("Generating Normal Prim");
      if (allowQuickAndDirtyMeshing)
      {
        if (prim.Flexible == null && prim.getType() == PrimType.Box &&
            prim.PrimData.ProfileHollow == 0 &&
            prim.PrimData.PathTwist == 0 &&
            prim.PrimData.PathTaperX == 0 &&
            prim.PrimData.PathTaperY == 0 &&
            prim.PrimData.PathSkew == 0 &&
View Full Code Here

    }
  }

  private void CalculateBoundingBox(RenderPrimitive rprim) throws Exception
  {
    Primitive prim = rprim.getBasePrim();

    // Calculate bounding volumes for each prim and adjust textures
    rprim.BoundingVolume = new BoundingVolume();
    for (int j = 0; j < rprim.Faces.size(); j++)
    {
View Full Code Here

            OSDMap map = (OSDMap)osd;
            List<Primitive> prims = new ArrayList<Primitive>(map.count());

            for(Map.Entry<String, OSD> kvp : map.entrySet())
            {
                Primitive prim = Primitive.FromOSD(kvp.getValue());
                prim.LocalID = Long.parseLong(kvp.getKey());
                prims.add(prim);
            }

            return prims;
View Full Code Here

  }
 
  @Override
    public Primitive remove(Long key)
  {
    Primitive p = super.remove(key);
    synchronized(primitivesByID)
    {
      primitivesByID.remove(p.ID);
    }
    removeChild(p);
View Full Code Here

  public static Avatar FromOSD(OSD O)
  {
    OSDMap tex = (OSDMap)O;
    Avatar A = new Avatar();
    Primitive P = Primitive.FromOSD(O);

    //FIXME need to uncomment following
//    Type Prim = typeof(Primitive);
//
//    FieldInfo[] Fields = Prim.GetFields();
View Full Code Here

    {
      return relativePosition;
    }

    // a bit more complicatated, agent sitting on a prim
    Primitive p = null;
    Vector3 fullPosition = relativePosition;

    if ((( p = Client.network.getCurrentSim().ObjectsPrimitives.get(sittingOn)) != null))
    {
      fullPosition = Vector3.add(p.Position,  Vector3.multiply(relativePosition,  p.Rotation));
View Full Code Here

  /// </summary>
  public Quaternion getSimRotation()
  {
    if (sittingOn != 0)
    {
      Primitive parent;
      if (Client.network.getCurrentSim() != null && ((parent = Client.network.getCurrentSim().ObjectsPrimitives.get(sittingOn))!=null))
      {
        return Quaternion.multiply(relativeRotation,  parent.Rotation);
      }
      else
View Full Code Here

        SaleType = map.get("sale_type").asInteger();
    }

    public Primitive ToPrimitive()
    {
        Primitive prim = new Primitive();
        prim.Properties = new ObjectProperties();
       
        prim.Acceleration = this.Acceleration;
        prim.AngularVelocity = this.AngularVelocity;
        prim.ClickAction = EnumsPrimitive.ClickAction.get((byte)this.ClickAction);
View Full Code Here

//                  }
//                }
//                  });
//              prim = primarray[0];
             
              Primitive prim = sim.ObjectsPrimitives.get(primID);

              //                                    Find((Primitive p) => { return p.ID == primID; });
              if (prim != null)
              {
                prim.MediaVersion = response.Version;
View Full Code Here

TOP

Related Classes of com.ngt.jopenmetaverse.shared.protocol.primitives.Primitive

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.