Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9258095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:18:30+00:00 2026-06-18T12:18:30+00:00

If my class has a variable that I have mapped to something else. Almost

  • 0

If my class has a variable that I have mapped to something else. Almost as if the class is wrapping an object in a software package, like a 3d node or something.

When a variable in the class is changed, that simple attribute change I would then want to run a function that set that attribute on the 3d node. Like myClass.translateX, changing this attr would then run a function to update the translateX of the 3d node.

Hope that makes sense, my google foo has failed so maybe I am not using the right terminology.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:18:32+00:00Added an answer on June 18, 2026 at 12:18 pm

    I think you want a property. It allows you to map attribute access on instances of a class to function calls, which you can use to perform the necessary operations on your 3d object:

    class My3dNodeWrapper(object):
        def __init__(self):
            self.node = Some3dNodeThing()
    
        @property
        def translateX(self):
            return self.node.getXTranslation() # or whatever
    
        @translateX.setter
        def translateX(self, value):
            self.node.setXTranslation(value) # or whatever
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have a main class and another class that has a variable I
I have a Class that has a private variable with a public setter/getter function:
I have a class that has a vector member variable, which I fill up
I have a custom class that has as an instance variable of a coordinate:
I have a variable that has several upper bounded wildcards, like so: private Map<
I have a abstract Parent class that has multiple children. I'd like the child
This is a purely theoretical question: I have a class that has a variable:
Inside my class I have a private variable that my methods use which has
I have a class that has the variable Magic. This is a 4 char
So I have a class that has the following member variables. I have get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.