示例#1
0
        /// <example>
        /// <code source='examples\vbnet\ex_orientonsrf.vb' lang='vbnet'/>
        /// <code source='examples\cs\ex_orientonsrf.cs' lang='cs'/>
        /// <code source='examples\py\ex_orientonsrf.py' lang='py'/>
        /// </example>
        public DocObjects.ObjRef Object(int index)
        {
            DocObjects.ObjRef rc  = new Rhino.DocObjects.ObjRef();
            IntPtr            ptr = NonConstPointer();

            UnsafeNativeMethods.CRhinoGetObject_Object(ptr, index, rc.NonConstPointer());
            return(rc);
        }
 /// <example>
 /// <code source='examples\vbnet\ex_orientonsrf.vb' lang='vbnet'/>
 /// <code source='examples\cs\ex_orientonsrf.cs' lang='cs'/>
 /// <code source='examples\py\ex_orientonsrf.py' lang='py'/>
 /// </example>
 public DocObjects.ObjRef Object(int index)
 {
   DocObjects.ObjRef rc = new Rhino.DocObjects.ObjRef();
   IntPtr ptr = NonConstPointer();
   UnsafeNativeMethods.CRhinoGetObject_Object(ptr, index, rc.NonConstPointer());
   return rc;
 }
示例#3
0
 /// <summary>
 /// In ReplayHistory, use GetRhinoObjRef to convert the information
 /// in a history record into the ObjRef that has up to date
 /// RhinoObject pointers
 /// </summary>
 /// <param name="id">HistoryRecord value id</param>
 /// <returns>ObjRef on success, null if not successful</returns>
 public Rhino.DocObjects.ObjRef GetRhinoObjRef(int id)
 {
   ObjRef objref = new ObjRef();
   IntPtr pObjRef = objref.NonConstPointer();
   if (UnsafeNativeMethods.CRhinoHistoryRecord_GetRhinoObjRef(m_pConstRhinoHistoryRecord, id, pObjRef))
     return objref;
   return null;
 }