本文整理汇总了C++中IParamBlock2::GetValue方法的典型用法代码示例。如果您正苦于以下问题:C++ IParamBlock2::GetValue方法的具体用法?C++ IParamBlock2::GetValue怎么用?C++ IParamBlock2::GetValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IParamBlock2
的用法示例。
在下文中一共展示了IParamBlock2::GetValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetGenUVW
void RendSpline::SetGenUVW(BOOL sw)
{
if (sw==HasUVW()) return;
else
{
BOOL doRender, doDisplay;
pblock->GetValue(rnd_render,0.0f,doRender,FOREVER); // check if it's renderable
pblock->GetValue(rnd_display,0.0f,doDisplay,FOREVER); // check if it's renderable
if (doRender || doDisplay)
pblock->SetValue(rnd_genuvw,0.0f,sw,0); // sets UVW ON if needed
}
UpdateUI();
//TODO: Set the plugin internal value to sw
}
示例2: GetDimmer
float LuminaireObject::GetDimmer(TimeValue time, Interval& valid) const
{
DbgAssert(mpBlock != NULL);
float value = 0.0f;
mpBlock->GetValue(kPB_DIMMER, time, value, valid);
return value;
}
示例3: NotifyRefChanged
RefResult SymmetryMod::NotifyRefChanged( const Interval& changeInt,RefTargetHandle hTarget,
PartID& partID, RefMessage message, BOOL propagate) {
ParamID pid;
int weld;
IParamMap2 *pPMap;
HWND hDialog, hThreshLabel;
switch (message) {
case REFMSG_CHANGE:
if (hTarget != mp_pblock)
break;
pid = mp_pblock->LastNotifyParamID ();
if (pid != kSymWeld)
break;
pPMap = mp_pblock->GetMap(kSymmetryParams);
if (!pPMap)
break;
hDialog = pPMap->GetHWnd();
if (!hDialog)
break;
mp_pblock->GetValue (kSymWeld, TimeValue(0), weld, FOREVER);
hThreshLabel = GetDlgItem (hDialog, IDC_SYM_THRESH_LABEL);
if (hThreshLabel)
EnableWindow (hThreshLabel, weld);
break;
}
return REF_SUCCEED;
}
示例4: GetCOREInterface
ISubObjType *ConvertToPoly::GetSubObjType(int i) {
static bool initialized = false;
if(!initialized) {
initialized = true;
SOT_Vertex.SetName(GetString(IDS_VERTEX));
SOT_Edge.SetName(GetString(IDS_EDGE));
SOT_Face.SetName(GetString(IDS_FACE));
}
switch(i) {
case -1:
{
int selLevel;
Interval ivalid = FOREVER;
pblock->GetValue (turn_sel_level, GetCOREInterface()->GetTime(), selLevel, ivalid);
if(selLevel == 0) return NULL;
else {
selLevel = UI2SelLevel(selLevel);
return selLevel > 0 ? GetSubObjType(selLevel-1) : NULL;
}
}
break;
case 0: return &SOT_Vertex;
case 1: return &SOT_Edge;
case 2: return &SOT_Face;
}
return NULL;
}
示例5: GetRGBFilterColor
Point3 LuminaireObject::GetRGBFilterColor(TimeValue& time, Interval& valid) const
{
DbgAssert(mpBlock != NULL);
Point3 value = Point3(0.0f, 0.0f, 0.0f);
mpBlock->GetValue(kPB_FILTER_COLOR, time, value, valid);
return value;
}
示例6: UpdateUI
void EllipseObject::UpdateUI(HWND hwnd)
{
Interval valid;
BOOL build_outine = FALSE;
TimeValue t = ip? ip->GetTime() : 0;
myParamBlock->GetValue(PB_OUTLINE, t, build_outine, valid);
ICustEdit *thickness_edit = GetICustEdit(GetDlgItem(hwnd, IDC_THICKNESSEDIT));
ISpinnerControl *thickness_spin = GetISpinner(GetDlgItem(hwnd, IDC_THICKSPINNER));
if(!thickness_edit || !thickness_spin)
return;
if(build_outine)
{
EnableWindow(GetDlgItem(hwnd,IDC_THICKNESS_TEXT),TRUE);
thickness_edit->Enable();
thickness_spin->Enable();
}
else
{
EnableWindow(GetDlgItem(hwnd,IDC_THICKNESS_TEXT),FALSE);
thickness_edit->Disable();
thickness_spin->Disable();
}
ReleaseICustEdit(thickness_edit);
ReleaseISpinner(thickness_spin);
}
示例7: ModifyTriObject
void EChamferMod::ModifyTriObject (TimeValue t, ModContext &mc, TriObject *tobj) {
Mesh &mesh = tobj->GetMesh();
Interval iv = FOREVER;
float amount;
int i, j;
m_pblock->GetValue (kEchAmount, t, amount, iv);
// Convert existing selection (at whatever level) to edge selection:
BitArray targetEdges;
targetEdges.SetSize (mesh.numFaces*3);
targetEdges.ClearAll ();
switch (mesh.selLevel) {
case MESH_OBJECT:
targetEdges.SetAll ();
break;
case MESH_VERTEX:
for (i=0; i<mesh.numFaces; i++) {
for (j=0; j<3; j++) {
if (!mesh.vertSel[mesh.faces[i].v[j]]) continue;
// Don't select invisible edges:
if (mesh.faces[i].getEdgeVis(j)) targetEdges.Set (i*3+j);
if (mesh.faces[i].getEdgeVis((j+2)%3)) targetEdges.Set (i*3+(j+2)%3);
}
}
break;
case MESH_EDGE:
targetEdges = mesh.edgeSel;
break;
case MESH_FACE:
for (i=0; i<mesh.numFaces; i++) {
if (!mesh.faceSel[i]) continue;
for (j=0; j<3; j++) {
// Don't select invisible edges:
if (mesh.faces[i].getEdgeVis(j)) targetEdges.Set (i*3+j);
}
}
break;
}
// Chamfer the edges -- this just does the topological operation.
MeshDelta tmd;
tmd.InitToMesh (mesh);
MeshTempData temp;
temp.SetMesh (&mesh);
MeshChamferData *mcd = temp.ChamferData();
AdjEdgeList *ae = temp.AdjEList();
tmd.ChamferEdges (mesh, targetEdges, *mcd, ae);
tmd.Apply (mesh);
// Reset the meshdelta, temp data to deal with the post-chamfered topology:
tmd.InitToMesh (mesh);
temp.Invalidate (TOPO_CHANNEL); // Generates a new edge list, but preserves chamfer data
temp.SetMesh (&mesh);
tmd.ChamferMove (mesh, *temp.ChamferData(), amount, temp.AdjEList());
tmd.Apply (mesh);
tobj->UpdateValidity(GEOM_CHAN_NUM,iv);
}
示例8: PreShade
void CompositeMat::PreShade(ShadeContext& sc, IReshadeFragment* pFrag)
{
int i(0);
Mtl *submtl = NULL;
// BOOL enabled(FALSE);
char texLengths[12];
int lengthChan = pFrag->NTextures();
pFrag->AddIntChannel(0);
pFrag->AddIntChannel(0);
pFrag->AddIntChannel(0);
int nPrevTex = 3 + lengthChan;
// preshade any submaterials
for (i=0; i<MAX_NUM_MTLS; i++)
{
pblock2->GetValue(compmat_mtls, sc.CurTime(), submtl, FOREVER, i);
if (submtl){
IReshading* pReshading = (IReshading*)(submtl->GetInterface(IID_IReshading));
if( pReshading ){
pReshading->PreShade(sc, pFrag);
int nTex = pFrag->NTextures();
texLengths[i] = char( nTex - nPrevTex);
nPrevTex = nTex;
}
}
}
int* pI = (int*)&texLengths[0];
pFrag->SetIntChannel( lengthChan++, pI[0] );
pFrag->SetIntChannel( lengthChan++, pI[1] );
pFrag->SetIntChannel( lengthChan, pI[2] );
}
示例9: BuildOptimize
void bhkRigidBodyModifier::BuildOptimize(Mesh& mesh)
{
BOOL enable = FALSE;
pblock->GetValue(PB_OPT_ENABLE, 0, enable, FOREVER, 0);
if (enable)
{
float maxedge, facethresh, edgethresh, bias;
pblock->GetValue(PB_MAXEDGE, 0, maxedge, FOREVER, 0);
pblock->GetValue(PB_FACETHRESH, 0, facethresh, FOREVER, 0);
pblock->GetValue(PB_EDGETHRESH, 0, edgethresh, FOREVER, 0);
pblock->GetValue(PB_BIAS, 0, bias, FOREVER, 0);
DWORD flags = OPTIMIZE_AUTOEDGE;
mesh.Optimize(facethresh, edgethresh, bias, maxedge, flags, NULL);
}
}
示例10: GetLocalBoundBox
void PointHelpObject::GetLocalBoundBox(
TimeValue t, INode* inode, ViewExp* vpt, Box3& box )
{
if ( ! vpt || ! vpt->IsAlive() )
{
box.Init();
return;
}
Matrix3 tm = inode->GetObjectTM(t);
float size;
int screenSize;
pblock2->GetValue(pointobj_size, t, size, FOREVER);
pblock2->GetValue(pointobj_screensize, t, screenSize, FOREVER);
float zoom = 1.0f;
if (screenSize) {
zoom = vpt->GetScreenScaleFactor(tm.GetTrans())*ZFACT;
}
if (zoom==0.0f) zoom = 1.0f;
size *= zoom;
box = Box3(Point3(0,0,0), Point3(0,0,0));
box += Point3(size*0.5f, 0.0f, 0.0f);
box += Point3( 0.0f, size*0.5f, 0.0f);
box += Point3( 0.0f, 0.0f, size*0.5f);
box += Point3(-size*0.5f, 0.0f, 0.0f);
box += Point3( 0.0f, -size*0.5f, 0.0f);
box += Point3( 0.0f, 0.0f, -size*0.5f);
//JH 6/18/03
//This looks odd but I'm being conservative an only excluding it for
//the case I care about which is when computing group boxes
// box.EnlargeBy(10.0f/zoom);
if(!(extDispFlags & EXT_DISP_GROUP_EXT))
box.EnlargeBy(10.0f/zoom);
/*
if (showAxis)
box = GetAxisBox(vpt,tm,showAxis?axisLength:0.0f, TRUE);
else
box = Box3(Point3(0,0,0), Point3(0,0,0));
*/
}
示例11: GetNode
INode* OrientConstRotation::GetNode(int targetNumber){
if (targetNumber >= 0 && targetNumber < pblock->Count(orientation_target_list)){
INode *orient_targ;
pblock->GetValue(orientation_target_list, 0, orient_targ, FOREVER, targetNumber);
return orient_targ;
}
return NULL;
}
示例12: ModifyPolyObject
void SymmetryMod::ModifyPolyObject (TimeValue t, ModContext &mc, PolyObject *pobj, INode *inode) {
MNMesh &mesh = pobj->GetMesh();
if (mUseRampageWeldMath)
mesh.SetFlag(MN_MESH_USE_MAX2012_WELD_MATH,TRUE);
// Luna task 747
// We cannot support specified normals in Symmetry at this time.
mesh.ClearSpecifiedNormals();
Interval iv = FOREVER;
int axis, slice, weld, flip;
float thresh;
mp_pblock->GetValue (kSymAxis, t, axis, iv);
mp_pblock->GetValue (kSymFlip, t, flip, iv);
mp_pblock->GetValue (kSymSlice, t, slice, iv);
mp_pblock->GetValue (kSymWeld, t, weld, iv);
mp_pblock->GetValue (kSymThreshold, t, thresh, iv);
if (thresh<0) thresh=0;
// Get transform from mp_mirror controller:
Matrix3 tm = CompMatrix (t, NULL, &mc, &iv);
Matrix3 itm = Inverse (tm);
// Get DotProd(N,x)=off plane definition from transform
Point3 Axis(0,0,0);
Axis[axis] = flip ? -1.0f : 1.0f;
Point3 or = tm.GetTrans();
Point3 N = Normalize(tm*Axis - or);
float off = DotProd (N, or);
if (slice) SlicePolyObject (mesh, N, off);
MirrorPolyObject (mesh, axis, tm, itm);
if (weld) {
WeldPolyObject (mesh, N, off, thresh);
RemovePolySpurs (mesh);
}
pobj->UpdateValidity (GEOM_CHAN_NUM, iv);
pobj->UpdateValidity (TOPO_CHAN_NUM, iv);
pobj->UpdateValidity (VERT_COLOR_CHAN_NUM, iv);
pobj->UpdateValidity (TEXMAP_CHAN_NUM, iv);
pobj->UpdateValidity (SELECT_CHAN_NUM, iv);
}
示例13: ChangesSelType
bool ConvertToPoly::ChangesSelType()
{
int selLevel;
Interval ivalid = FOREVER;
pblock->GetValue (turn_sel_level, GetCOREInterface()->GetTime(), selLevel, ivalid);
if(selLevel == 0) return false;
else return true;
}
示例14: LocalValidity
Interval SymmetryMod::LocalValidity(TimeValue t) {
// aszabo|feb.05.02 If we are being edited,
// return NEVER to forces a cache to be built after previous modifier.
if (TestAFlag(A_MOD_BEING_EDITED))
return NEVER;
Interval iv = FOREVER;
int foo;
mp_pblock->GetValue(kSymAxis, t, foo, iv);
mp_pblock->GetValue (kSymFlip, t, foo, iv);
mp_pblock->GetValue(kSymWeld, t, foo, iv);
mp_pblock->GetValue(kSymSlice, t, foo, iv);
float thresh;
mp_pblock->GetValue (kSymThreshold, t, thresh, iv);
Matrix3 mat(1);
mp_mirror->GetValue(t,&mat,iv,CTRL_RELATIVE);
return iv;
}
示例15: Update
void CompositeMat::Update(TimeValue t, Interval& valid)
{
ivalid = FOREVER;
curTime = t;
for (int i = 0; i < MAX_NUM_MTLS; i++)
{
Mtl* sub = NULL;
float u;
pblock2->GetValue(compmat_mtls,t,sub,valid,i);
if (sub != NULL)
{
sub->Update(t,valid);
if (i != MAX_NUM_MTLS-1)
pblock2->GetValue(compmat_amount,t,u,valid,i);
}
}
valid &= ivalid;
}